pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Sean Davis <sdavis2@mail.nih.gov>
To: Muhammad Nadeem Ashraf <nadeem_engg@yahoo.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Query about SQL in PostgreSQL
Date: Tue, 19 Apr 2005 06:16:01 -0400
Message-ID: <3e03ba89a90fd8db93e69a441815e2db@mail.nih.gov> (raw)
In-Reply-To: <20050419094846.21474.qmail@web50506.mail.yahoo.com>
References: <20050419094846.21474.qmail@web50506.mail.yahoo.com>


On Apr 19, 2005, at 5:48 AM, Muhammad Nadeem Ashraf wrote:

> Hi,
> I am new user of PostGreSQL 8.0.1. While using it i faced following 
> issue. As SQL is Case insensetive Language So the Uper or Lower cases 
> are not significant. But while using the database there is problem.
> If i Create new Table with name (tblstudent) then upon SQL queries it 
> is fine to use Select * from tblstudent. However i face probel if i 
> give the name of table in Capital letters i.e. if the name is 
> (tblStudent) then upon using Select * from tblStudent, following error 
> is appeard:
> ERROR:  relation "tblst" does not exist 
>  
> And if i use the query Select * from "tblStudent" then it works fine.

SQL is case insensitive.  However, identifiers (table names, column 
names, index names, etc.) are case sensitive in Postgresql.  So, your 
operational understanding of how things work seems to be correct.  I 
tend to use all lower-case, just because it saves me some thought, but 
I know some folks like to use a mix of upper and lower case so that 
they can be used in a web application, for example.  If you do use 
mixed or upper case, you do have to quote them.

If you still have a problem, could you be more specific about what it 
is?

Sean




view thread (9+ messages)  latest in thread

Message-ID: <3e03ba89a90fd8db93e69a441815e2db@mail.nih.gov>
Permalink:  ../3e03ba89a90fd8db93e69a441815e2db@mail.nih.gov/
Also on:    postgresql.org/message-id/3e03ba89a90fd8db93e69a441815e2db@mail.nih.gov

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: sdavis2@mail.nih.gov, nadeem_engg@yahoo.com
  Subject: Re: Query about SQL in PostgreSQL
  In-Reply-To: <3e03ba89a90fd8db93e69a441815e2db@mail.nih.gov>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox