Re: BUG #1570: Double quotes in all field/table names must be

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Christopher Brian Jurado <cbjurado(at)yahoo(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #1570: Double quotes in all field/table names must be
Date: 2005-04-03 01:18:10
Message-ID: 200504030118.j331IAd22967@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Christopher Brian Jurado wrote:
>
> The following bug has been logged online:
>
> Bug reference: 1570
> Logged by: Christopher Brian Jurado
> Email address: cbjurado(at)yahoo(dot)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(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2005-04-03 01:20:28 Re: BUG #1572: plpgsql in linux os
Previous Message Bruce Momjian 2005-04-03 01:10:19 Re: BUG #1568: concat