Received: from jupiter.hub.org (jupiter.hub.org [64.49.215.5]) by postgresql.org (Postfix) with ESMTP id 88065474E6D for ; Fri, 22 Feb 2002 02:41:06 -0500 (EST) Received: (from news@localhost) by jupiter.hub.org (8.11.6/8.11.6) id g1M6pFH33327 for pgsql-sql@postgresql.org; Fri, 22 Feb 2002 00:51:15 -0600 (CST) (envelope-from news) From: "pauLSiew" X-Newsgroups: comp.databases.postgresql.sql Subject: Re: SQL: Are the "" around table & coloumnames necessary? Date: Fri, 22 Feb 2002 14:50:55 +0800 Organization: Hub.Org Networking Services (http://www.hub.org) Lines: 47 Message-ID: References: <1014327565.3217.862.camel@linda> X-Complaints-To: news@hub.org X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 To: pgsql-sql@postgresql.org X-Archive-Number: 200202/309 X-Sequence-Number: 6731 Try not use the SQL keywords as ur table or field name. "Oliver Elphick" wrote in message news:1014327565.3217.862.camel@linda... > On Mon, 2002-02-18 at 12:43, Mikey wrote: > > Hello, > > > > when I write a select for example, > > it doesn't work this way: > > > > select col1, col2 > > from my_table; > > > > instead of that I have to write > > > > select "col1", "col2" > > from "my_table"; > > > > I dont understand this...is there a way to use > > the more comfortable form without "" ? > > The two queries you show are identical. However, if any of the column > names contain upper-case characters and were enclosed in double-quotes > when the table was created, you will get the behaviour you are > complaining about, because all unquoted identifiers are folded to > lower-case before the query is executed. > > The solution is not to use upper-case characters in identifiers. > If you already have tables with upper-case names, drop them and recreate > them (or do pg_dumpall, edit the dump file and reload the database). > > -- > Oliver Elphick Oliver.Elphick@lfix.co.uk > Isle of Wight http://www.lfix.co.uk/oliver > GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C > > "My sheep hear my voice, and I know them, and they > follow me; And I give unto them eternal life; and they > shall never perish, neither shall any man pluck them > out of my hand." John 10:27,28 > > > ---------------------------(end of broadcast)--------------------------- > TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)