X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 369AA5336C for ; Tue, 19 Apr 2005 09:53:58 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 62079-05 for ; Tue, 19 Apr 2005 12:53:53 +0000 (GMT) Received: from svr2.postgresql.org (svr2.postgresql.org [65.19.161.25]) by svr1.postgresql.org (Postfix) with ESMTP id 14BDA53D59 for ; Tue, 19 Apr 2005 08:17:23 -0300 (ADT) Received: from mx5.net.nih.gov (mx5.net.nih.gov [165.112.130.36]) by svr2.postgresql.org (Postfix) with ESMTP id 940B6F0B8F for ; Tue, 19 Apr 2005 12:14:17 +0100 (BST) Received: from mx5.net.nih.gov (localhost [127.0.0.1]) by mx5.net.nih.gov (8.12.10/8.11.6) with ESMTP id j3JAG3aq016399 for ; Tue, 19 Apr 2005 06:16:03 -0400 Received: from [128.231.145.14] (holmes.nhgri.nih.gov [128.231.145.14]) by mx5.net.nih.gov (8.12.10/8.11.6) with ESMTP id j3JAG1Kd016319; Tue, 19 Apr 2005 06:16:01 -0400 In-Reply-To: <20050419094846.21474.qmail@web50506.mail.yahoo.com> References: <20050419094846.21474.qmail@web50506.mail.yahoo.com> Mime-Version: 1.0 (Apple Message framework v619.2) Content-Type: text/plain; charset=ISO-8859-1; format=flowed Message-Id: <3e03ba89a90fd8db93e69a441815e2db@mail.nih.gov> Content-Transfer-Encoding: quoted-printable Cc: pgsql-sql@postgresql.org From: Sean Davis Subject: Re: Query about SQL in PostgreSQL Date: Tue, 19 Apr 2005 06:16:01 -0400 To: Muhammad Nadeem Ashraf X-Mailer: Apple Mail (2.619.2) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.004 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200504/281 X-Sequence-Number: 21174 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=20 > issue. As SQL is Case insensetive Language So the Uper or Lower cases=20= > are not significant. But while using the database there is problem. > If i Create new Table with name (tblstudent) then upon SQL queries it=20= > is fine to=A0use Select * from tblstudent. However i face probel if i=20= > give the name of table in Capital letters i.e. if the name is=20 > (tblStudent) then upon using=A0Select * from tblStudent,=A0following = error=20 > is appeard: > ERROR:=A0 relation "tblst" does not exist=A0 > =A0 > And if i use the query Select * from "tblStudent" then it works fine. SQL is case insensitive. However, identifiers (table names, column=20 names, index names, etc.) are case sensitive in Postgresql. So, your=20 operational understanding of how things work seems to be correct. I=20 tend to use all lower-case, just because it saves me some thought, but=20= I know some folks like to use a mix of upper and lower case so that=20 they can be used in a web application, for example. If you do use=20 mixed or upper case, you do have to quote them. If you still have a problem, could you be more specific about what it=20 is? Sean