pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
problem of upper/lower case in table names
5+ messages / 5 participants
[nested] [flat]

* problem of upper/lower case in table names
@ 1998-11-17 20:26 Charles-Edouard Ruault <cruault@planetweb.com>
  1998-11-17 21:22 ` Re: [GENERAL] problem of upper/lower case in table names Jay O'Connor <joconnor@roadrunner.com>
  1998-11-18 06:41 ` Re: [INTERFACES] problem of upper/lower case in table names Peter T Mount <peter@retep.org.uk>
  0 siblings, 2 replies; 5+ messages in thread

From: Charles-Edouard Ruault @ 1998-11-17 20:26 UTC (permalink / raw)
  To: pgsql-general@postgresql.org; pgsql-interfaces

Hi all,

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

NB : i'm using postgres 6.4 with jdbc driver included in this release.




^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: [GENERAL] problem of upper/lower case in table names
  1998-11-17 20:26 problem of upper/lower case in table names Charles-Edouard Ruault <cruault@planetweb.com>
@ 1998-11-17 21:22 ` Jay O'Connor <joconnor@roadrunner.com>
  1998-11-17 21:55   ` RE: [GENERAL] problem of upper/lower case in table names Taral <taral@cyberjunkie.com>
  1 sibling, 1 reply; 5+ messages in thread

From: Jay O'Connor @ 1998-11-17 21:22 UTC (permalink / raw)
  To: pgsql-general@postgreSQL.org

>Hi all,
>
>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

I've run into the same problem just creating a table with a name including an
uppercase.  The name gets converted to all lowercase but then I seem unable to
DROP the table.

>NB : i'm using postgres 6.4 with jdbc driver included in this release.
--
Jay O'Connor
joconnor@roadrunner.com
http://www.roadrunner.com/~joconnor

"God himself plays the bass strings first when He tunes the soul" 



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* RE: [GENERAL] problem of upper/lower case in table names
  1998-11-17 20:26 problem of upper/lower case in table names Charles-Edouard Ruault <cruault@planetweb.com>
  1998-11-17 21:22 ` Re: [GENERAL] problem of upper/lower case in table names Jay O'Connor <joconnor@roadrunner.com>
@ 1998-11-17 21:55   ` Taral <taral@cyberjunkie.com>
  1998-11-18 08:48     ` RE: [GENERAL] problem of upper/lower case in table names Postgres DBA <postgres@nest.bistbn.com>
  0 siblings, 1 reply; 5+ messages in thread

From: Taral @ 1998-11-17 21:55 UTC (permalink / raw)
  To: Jay O'Connor <joconnor@roadrunner.com>; pgsql-general@postgreSQL.org

> >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.

Taral



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* RE: [GENERAL] problem of upper/lower case in table names
  1998-11-17 20:26 problem of upper/lower case in table names Charles-Edouard Ruault <cruault@planetweb.com>
  1998-11-17 21:22 ` Re: [GENERAL] problem of upper/lower case in table names Jay O'Connor <joconnor@roadrunner.com>
  1998-11-17 21:55   ` RE: [GENERAL] problem of upper/lower case in table names Taral <taral@cyberjunkie.com>
@ 1998-11-18 08:48     ` Postgres DBA <postgres@nest.bistbn.com>
  0 siblings, 0 replies; 5+ messages in thread

From: Postgres DBA @ 1998-11-18 08:48 UTC (permalink / raw)
  To: Jay O'Connor <joconnor@roadrunner.com>; +Cc: PostgreSQL general Malining List <pgsql-general@postgreSQL.org>



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




^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: [INTERFACES] problem of upper/lower case in table names
  1998-11-17 20:26 problem of upper/lower case in table names Charles-Edouard Ruault <cruault@planetweb.com>
@ 1998-11-18 06:41 ` Peter T Mount <peter@retep.org.uk>
  1 sibling, 0 replies; 5+ messages in thread

From: Peter T Mount @ 1998-11-18 06:41 UTC (permalink / raw)
  To: Charles-Edouard Ruault <cruault@planetweb.com>; +Cc: pgsql-general@postgreSQL.org; pgsql-interfaces

On Tue, 17 Nov 1998, Charles-Edouard Ruault wrote:

> Hi all,
> 
> 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

It looks like the drivers. I'll check both this and the primary key
problem today, and will get back to you.

> 
> NB : i'm using postgres 6.4 with jdbc driver included in this release.
> 
> 

-- 
       Peter T Mount peter@retep.org.uk
      Main Homepage: http://www.retep.org.uk
PostgreSQL JDBC Faq: http://www.retep.org.uk/postgres
 Java PDF Generator: http://www.retep.org.uk/pdf




^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~1998-11-18 08:48 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1998-11-17 20:26 problem of upper/lower case in table names Charles-Edouard Ruault <cruault@planetweb.com>
1998-11-17 21:22 ` Jay O'Connor <joconnor@roadrunner.com>
1998-11-17 21:55   ` Taral <taral@cyberjunkie.com>
1998-11-18 08:48     ` Postgres DBA <postgres@nest.bistbn.com>
1998-11-18 06:41 ` Peter T Mount <peter@retep.org.uk>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox