Re: metadata searching

From: "Juriy Goloveshkin" <j(at)gu(dot)ru>
To: "Oliver Jowett" <oliver(at)opencloud(dot)com>
Cc: <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: metadata searching
Date: 2004-02-04 08:34:48
Message-ID: 001201c3eaf9$c019f9f0$f2c745d9@hjugonb
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

> > I have a problem with jdbc driver.
> >
> > There is one java program. It can create tables by name if it doesn`t
exist.
> >
> > If tabe name has upper letters like 'Base', then create statement looks
like
> > 'create Base (...' and postgresql create table in lowercase.
> > Then if I want to know is there the table 'Base' I use
> >
> > DatabaseMetaData.getTables(null, "%", name, types) and...
(name="Bases")...
> > no tables found.
> >
> > may be when jdbc driver searches information by name, it is reasonable
to
> > lowercase it or use ilike in statements?
> >
> > I think if postgresql is sql-insensetive (select from Base == select
from
> > base), jdbc have to be insensetive too.
> > What do you think?
>
> What happens when you have two tables that differ only in case? Seems
> like the current behaviour is correct to me.

Ok. Are You want to say that the different behavior in sql engine and jdbc
code is normal?
why I can build sql statement like 'select from Base' and 'select from base'
while I have only one table 'base',
but getTables(..., "Base", ...) and getTables(..., "base", ...) gives me a
diffenent result.
Where is the logic?
What about psql?
\d Base
\d base
gives me info about the table 'base'. but not jdbc getTables(). pretty nice.

I think the logic of things like getTables have to be the same as the sql
engine.

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Juriy Goloveshkin 2004-02-04 08:40:31 Re: metadata searching
Previous Message Tom Lane 2004-02-04 07:13:24 Re: Comments on adding more connection URL parameters.