Database Research & Development

  • Home
  • NoSQL
    • NoSQL
    • Cassandra
  • Databases
    • Database Theory
    • Database Designing
    • SQL Server Coding Standards
    • SQL Server
    • PostgreSQL
    • MySQL
    • Greenplum
    • Linux
  • Interviews
    • SQL Server Interviews
    • MySQL Interviews
    • SQL Puzzles
  • DBA Scripts
    • SQL Server DBA Scripts
    • PostgreSQL DBA Scripts
    • MySQL DBA Scripts
    • Greenplum DBA Scripts
  • Home
  • Blog Archives !
  • (: Laugh@dbrnd :)
  • Contact Me !
sqlserverinterviews
Home 2015 October PostgreSQL: Why identifiers are Case-Sensitive

PostgreSQL: Why identifiers are Case-Sensitive

This article is half-done without your Comment! *** Please share your thoughts via Comment ***

Guys, this is one of the important discussion of PostgreSQL.
All identifiers, including column name, are Case-Sensitive in PostgreSQL?

Yes: when you define identifier in the double-quote, it is a Case-Sensitive.
No: when you do not use double-quote for an identifier, it is not a Case-Sensitive.

For example:
With double-quoted:

1
2
3
CREATE TABLE "Test" (rno integer);
SELECT *FROM Test /*True...*/
SELECT *FROM test; /*False...not work*/

Without double-quoted:

1
2
3
4
CREATE TABLE Test(rno integer);
SELECT *FROM Test /*True...*/
SELECT *FROM teST /*True...*/
SELECT *FROM test /*True...*/

My advice: Never use double-quoted for any identifiers. Otherwise, you will face the problem of case-sensitivity.
When you do not use double-quoted, PostgreSQL internally store all identifiers in small latter and you can access those all identifiers in any case.

When you create your table using PGAdmin UI, by default it creates all identifiers with double-quoted.
Always try to create your database objects by using the SQL script.

Oct 24, 2015Anvesh Patel
SQL Server: Script to find all Default values with ColumnsMySQL: Set default value for a Datetime Column
Comments: 3
  1. navigate to these guys
    November 1, 2015 at 11:10 am

    I just want to mention I am beginner to blogs and definitely liked this page. Likely I’m planning to bookmark your website . You absolutely have superb stories. Thank you for sharing with us your web-site.

  2. csgo
    May 24, 2016 at 2:46 pm

    Unbelievably individual friendly site. Astounding details offered on couple of clicks

  3. nba2k
    June 6, 2016 at 2:13 pm

    You’ve got incredible info here

Anvesh Patel
Anvesh Patel

Database Engineer

October 24, 2015 PostgreSQLAnvesh Patel, case-sensitive, database, database research and development, dbrnd, double quoted, plpgsql, Postgres Query, postgresql, PostgreSQL Administrator, PostgreSQL Error, PostgreSQL Programming, PostgreSQL Tips and Tricks
About Me!

I'm Anvesh Patel, a Database Engineer certified by Oracle and IBM. I'm working as a Database Architect, Database Optimizer, Database Administrator, Database Developer. Providing the best articles and solutions for different problems in the best manner through my blogs is my passion. I have more than six years of experience with various RDBMS products like MSSQL Server, PostgreSQL, MySQL, Greenplum and currently learning and doing research on BIGData and NoSQL technology. -- Hyderabad, India.

About DBRND !

dbrnd

This is a personal blog (www.dbrnd.com).

Any views or opinions represented in this blog are personal and belong solely to the blog owner and do not represent those of people, institutions or organizations that the owner may or may not be associated with in professional or personal capacity, unless explicitly stated.

Feel free to challenge me, disagree with me, or tell me I’m completely nuts in the comments section of each blog entry, but I reserve the right to delete any comment for any reason whatsoever (abusive, profane, rude, or anonymous comments) - so keep it polite.

The content of this website is protected by copyright. No portion of this website may be copied or replicated in any form without the written consent of the website owner.

Recent Comments !
  • Anvesh Patel { Sure will do... } – May 27, 12:43 PM
  • Anvesh Patel { Great... } – May 27, 12:41 PM
  • Anvesh Patel { Great... } – May 27, 12:39 PM
  • Anvesh Patel { Great... } – May 27, 12:36 PM
  • Anvesh Patel { Great... } – May 27, 12:28 PM
  • Anvesh Patel { Great... } – May 27, 12:27 PM
  • Anvesh Patel { Great... } – May 27, 12:16 PM
  • Older »
Follow Me !
  • facebook
  • linkedin
  • twitter
  • youtube
  • google
  • flickr
© 2015 – 2019 All rights reserved. Database Research & Development (dbrnd.com)
Posting....