Re: a problem with case in psql - Mailing list pgsql-bugs

From Stephan Szabo
Subject Re: a problem with case in psql
Date
Msg-id 20020404083537.N10666-100000@megazone23.bigpanda.com
Whole thread Raw
In response to a problem with case in psql  ("Øystein Thorsen" <othors99@grm.hia.no>)
List pgsql-bugs
On Wed, 3 Apr 2002, =D8ystein Thorsen wrote:

> I've used pgAccess to make all the tables and colums.
> Ex.: table diagnosis column diagnosis_ID
>
> Then, when I use psql to execute select statements, diagnosis_ID does
> not exist.
>
> But when I change the column name to diagnosis_id it works fine.
>
> The problem is therefore that it is possible to create a column name
> with uppercase but psql transforms all statements to lowercase, and
> therefore will not work.

It probably means that pgAccess is double quoting the identifier for you
on creation, in which case you should (and must if the identifier is
mixed case) always refer to it in double quotes.  If the identifier
wasn't double quoted at creation time it would have been case folded
to lowercase as well.

pgsql-bugs by date:

Previous
From: "Øystein Thorsen"
Date:
Subject: a problem with case in psql
Next
From: pgsql-bugs@postgresql.org
Date:
Subject: Bug #629: "for ... select ... loop" repeat first 9 rows