Re: CachedRowSetXImpl() and PostgreSQL

From: Poul Møller Hansen <freebsd(at)pbnet(dot)dk>
To: Oliver Jowett <oliver(at)opencloud(dot)com>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: CachedRowSetXImpl() and PostgreSQL
Date: 2006-09-21 20:32:43
Message-ID: 4512F6EB.8000701@pbnet.dk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc


>
> If you could at least track it down to a particular metadata call that
> the driver is incorrectly implementing that might get a response, but
> as it is there is nothing I can debug here.
Isn't that what I did ?
Here is all statements when setting the table name to "my.table":
-----
SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL READ COMMITTED;
BEGIN;
SELECT t.typlen FROM pg_catalog.pg_type t, pg_catalog.pg_namespace n
WHERE t.typnamespace=n.oid AND t.typname='name' AND n.nspname='pg_catalog';
SELECT
n.nspname,c.relname,a.attname,a.atttypid,a.attnotnull,a.atttypmod,a.attlen,a.attnum,def.adsrc,dsc.description
FROM pg_catalog.pg_namespace n JOIN pg_catalog.pg_class c ON
(c.relnamespace = n.oid) JOIN pg_catalog.pg_attribute a ON
(a.attrelid=c.oid) LEFT JOIN pg_catalog.pg_attrdef def ON
(a.attrelid=def.adrelid AND a.attnum = def.adnum) LEFT JOIN
pg_catalog.pg_description dsc ON (c.oid=dsc.objoid AND a.attnum =
dsc.objsubid) LEFT JOIN pg_catalog.pg_class dc ON (dc.oid=dsc.classoid
AND dc.relname='pg_class') LEFT JOIN pg_catalog.pg_namespace dn ON
(dc.relnamespace=dn.oid AND dn.nspname='pg_catalog') WHERE a.attnum > 0
AND NOT a.attisdropped AND c.relname LIKE 'my.table' AND a.attname
LIKE 'id' ORDER BY nspname,relname,attnum;
SELECT
n.nspname,c.relname,a.attname,a.atttypid,a.attnotnull,a.atttypmod,a.attlen,a.attnum,def.adsrc,dsc.description
FROM pg_catalog.pg_namespace n JOIN pg_catalog.pg_class c ON
(c.relnamespace = n.oid) JOIN pg_catalog.pg_attribute a ON
(a.attrelid=c.oid) LEFT JOIN pg_catalog.pg_attrdef def ON
(a.attrelid=def.adrelid AND a.attnum = def.adnum) LEFT JOIN
pg_catalog.pg_description dsc ON (c.oid=dsc.objoid AND a.attnum =
dsc.objsubid) LEFT JOIN pg_catalog.pg_class dc ON (dc.oid=dsc.classoid
AND dc.relname='pg_class') LEFT JOIN pg_catalog.pg_namespace dn ON
(dc.relnamespace=dn.oid AND dn.nspname='pg_catalog') WHERE a.attnum > 0
AND NOT a.attisdropped AND c.relname LIKE 'my.table' AND a.attname
LIKE 'url' ORDER BY nspname,relname,attnum;
ROLLBACK;
SHOW TRANSACTION ISOLATION LEVEL;
-----

It will not fine "my.table" as it should have been "table" only.
If I set the tablename to "table" the result is this:

-----
SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL READ COMMITTED;
BEGIN;
SELECT t.typlen FROM pg_catalog.pg_type t, pg_catalog.pg_namespace n
WHERE t.typnamespace=n.oid AND t.typname='name' AND n.nspname='pg_catalog';
SELECT
n.nspname,c.relname,a.attname,a.atttypid,a.attnotnull,a.atttypmod,a.attlen,a.attnum,def.adsrc,dsc.description
FROM pg_catalog.pg_namespace n JOIN pg_catalog.pg_class c ON
(c.relnamespace = n.oid) JOIN pg_catalog.pg_attribute a ON
(a.attrelid=c.oid) LEFT JOIN pg_catalog.pg_attrdef def ON
(a.attrelid=def.adrelid AND a.attnum = def.adnum) LEFT JOIN
pg_catalog.pg_description dsc ON (c.oid=dsc.objoid AND a.attnum =
dsc.objsubid) LEFT JOIN pg_catalog.pg_class dc ON (dc.oid=dsc.classoid
AND dc.relname='pg_class') LEFT JOIN pg_catalog.pg_namespace dn ON
(dc.relnamespace=dn.oid AND dn.nspname='pg_catalog') WHERE a.attnum > 0
AND NOT a.attisdropped AND c.relname LIKE 'table' AND a.attname LIKE
'id' ORDER BY nspname,relname,attnum;
SELECT
n.nspname,c.relname,a.attname,a.atttypid,a.attnotnull,a.atttypmod,a.attlen,a.attnum,def.adsrc,dsc.description
FROM pg_catalog.pg_namespace n JOIN pg_catalog.pg_class c ON
(c.relnamespace = n.oid) JOIN pg_catalog.pg_attribute a ON
(a.attrelid=c.oid) LEFT JOIN pg_catalog.pg_attrdef def ON
(a.attrelid=def.adrelid AND a.attnum = def.adnum) LEFT JOIN
pg_catalog.pg_description dsc ON (c.oid=dsc.objoid AND a.attnum =
dsc.objsubid) LEFT JOIN pg_catalog.pg_class dc ON (dc.oid=dsc.classoid
AND dc.relname='pg_class') LEFT JOIN pg_catalog.pg_namespace dn ON
(dc.relnamespace=dn.oid AND dn.nspname='pg_catalog') WHERE a.attnum > 0
AND NOT a.attisdropped AND c.relname LIKE 'table' AND a.attname LIKE
'url' ORDER BY nspname,relname,attnum;
SELECT id, url FROM table WHERE id = $1 AND url = $2

2006-09-21 14:30:40 CEST - ERROR: relation "table" does not exist

ROLLBACK;
SHOW TRANSACTION ISOLATION LEVEL;
-----

Please let me know if more is needed.

Poul

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Oliver Jowett 2006-09-21 21:14:34 Re: CachedRowSetXImpl() and PostgreSQL
Previous Message Poul Møller Hansen 2006-09-21 20:08:06 Re: CachedRowSetXImpl() and PostgreSQL