Re: metadata searching
От | Oliver Jowett |
---|---|
Тема | Re: metadata searching |
Дата | |
Msg-id | 4020C3BC.2070201@opencloud.com обсуждение исходный текст |
Ответ на | metadata searching ("Juriy Goloveshkin" <j@gu.ru>) |
Ответы |
Re: metadata searching
|
Список | pgsql-jdbc |
Juriy Goloveshkin wrote: >>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. You're only seeing inconsistencies because you're using unquoted identifiers on the SQL side. Java strings are case-sensitive; the behaviour of getTables is consistent with what you get when using case-sensitive (i.e. quoted) SQL identifiers. Witness: $ psql testdb Welcome to psql 7.4.1, the PostgreSQL interactive terminal. [...] testdb=> create table "test" (k int4); CREATE TABLE testdb=> create table "Test" (q int4); CREATE TABLE testdb=> \d "test" Table "public.test" Column | Type | Modifiers --------+---------+----------- k | integer | testdb=> \d "Test" Table "public.Test" Column | Type | Modifiers --------+---------+----------- q | integer | -O
В списке pgsql-jdbc по дате отправления: