Christopher Brian Jurado wrote:
>
> The following bug has been logged online:
>
> Bug reference: 1570
> Logged by: Christopher Brian Jurado
> Email address: cbjurado@yahoo.com
> PostgreSQL version: 8.0
> Operating system: Windows 2000
> Description: Double quotes in all field/table names must be optional!
> Details:
>
> The double quote(") for field/table names doesn't seem to be optional when
> using it in queries.
>
> I used pgAdmin under verion 8.0 to query any field on any table. A message
> says the relation does not exist. If I double-quote the field names and
> table names, then it works. Isn't it a very big burden to keep typing double
> quotes?
>
> I tried searching through the postgresql.conf file but nothing is there to
> control this behavior.
>
> In the documentation, they show samples without double quotes but it
> actually doesn't work when you try it.
The problem is that when you create a mixed upper/lowercase table or
column name using pgadmin, it double-quotes the identifier in CREATE,
but when you access it via SQL, you need to double-quote it yourself.
I think this is done because it allows pgadmin to preserve any case used
in the create, and pgadmin is consistent in quoting, but when you access
via SQL, you have to then do it too.
I think the only solution is to use only lowercase when creating objects
in pgadmin, unless you want to do double-quoting.
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073