RE: [GENERAL] problem of upper/lower case in table names

From: Postgres DBA <postgres(at)nest(dot)bistbn(dot)com>
To: "Jay O'Connor" <joconnor(at)roadrunner(dot)com>
Cc: PostgreSQL general Malining List <pgsql-general(at)postgreSQL(dot)org>
Subject: RE: [GENERAL] problem of upper/lower case in table names
Date: 1998-11-18 08:48:17
Message-ID: Pine.BSF.4.02.9811181040210.8127-100000@nest.bistbn.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-interfaces

On Tue, 17 Nov 1998, Taral wrote:

> > >i've got this annoying problem : if you create a table with an uppercase
> > >name, postgres transforms it in lower case. After that, if you try to
> > >retrieve the primary keys for this table ( still using the uppercase
> > >name as argument ) using the JDBC driver
> > >DatabaseMetaData.getPrimaryKeys(), it always return an empty result set
> > >since the SQL command used in the driver requests a case sensitive match
> > >for the table name ( and bc.relname ~ table ).
> > >I've a workaround in the driver ( using bc.relname ~* table ) but i'd
> > >like to know who's fault it is ( mine or postgres ) ....
> > >Thanks for your advices & help
>
> Try quoting the names... i.e. CREATE TABLE "TEST" etc.
>

Very important note: quoting names of tables, indicies, fields etc. SHOULD
solve this problem, but be careful! As far as I know there are some bugs
related to usage of capital letters in tables and indicies names, so wait
for officail patch that should be published during next few days with
6.4.1 release (or try to found one on hackers' list archive).

Aleksey

In response to

Browse pgsql-general by date

  From Date Subject
Next Message f.ermini 1998-11-18 12:26:42 How do I COPY empty Datetimes?
Previous Message Peter T Mount 1998-11-18 06:41:55 Re: [INTERFACES] problem of upper/lower case in table names

Browse pgsql-interfaces by date

  From Date Subject
Next Message Constantin Teodorescu 1998-11-18 12:59:51 Re: Primary Keys and Foreign Keys in PgAccess
Previous Message Anatoly K. Lasareff 1998-11-18 07:49:49 Re: [INTERFACES] RE: [HACKERS] PREPARE