SV: Table whose name has Capital letters - Mailing list pgsql-general

From Jarmo Paavilainen
Subject SV: Table whose name has Capital letters
Date
Msg-id 00af01c0560b$f275a880$1501a8c0@theboss.comder.private
Whole thread Raw
In response to Table whose name has Capital letters  (Gabriel Fernandez <gabi@unica.edu>)
Responses Re: SV: Table whose name has Capital letters
List pgsql-general
Hi,

...
> I have created a table with the name 'Nov2000' and now it is impossible to
> access it, because psql is always searching for the table 'nov2000'.

Put the table name inside quotes. ie: SELECT FROM "Nov2000" _not_ SELECT
FROM Nov2000

...
> Have I done something wrong or is it a bug ?  I mean, it seems psql is
> alwyas converting the query string to lowercase, but it doesn't when you
> create a table, a index or a sequence.

*I think* its a bug. But no it is not, its so by design (SQL92 thing).

// Jarmo

PS: Im thinking of making a own hack of pg where selects are case sensitive
(ie Nov2000 and "Nov2000" are the same). If someone is interested, Ill
upload the diff somewhere. DS.


pgsql-general by date:

Previous
From: Max Fonin
Date:
Subject: Re: [HACKERS] Enum type emulation: problem with opaque type in PL/pgSQL functions
Next
From: hubert depesz lubaczewski
Date:
Subject: Re: create snapshot?