X-Original-To: pgsql-jdbc-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 18D649FA4D1 for ; Thu, 21 Sep 2006 11:03:04 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 99059-10 for ; Thu, 21 Sep 2006 11:02:55 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from kjeld.care4all.dk (cpe.atm2-0-52453.0x50a4a22a.esnxx3.customer.tele.dk [80.164.162.42]) by postgresql.org (Postfix) with ESMTP id 8D8279FA0EB for ; Thu, 21 Sep 2006 11:02:54 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by kjeld.care4all.dk (Postfix) with ESMTP id 8EC13420342 for ; Thu, 21 Sep 2006 16:02:47 +0200 (CEST) Received: from kjeld.care4all.dk ([127.0.0.1]) by localhost (kjeld.care4all.dk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 25183-08 for ; Thu, 21 Sep 2006 16:02:39 +0200 (CEST) Received: from [172.19.10.10] (x1-6-00-80-c8-03-a6-d7.k438.webspeed.dk [83.89.23.114]) by kjeld.care4all.dk (Postfix) with ESMTP for ; Thu, 21 Sep 2006 16:02:39 +0200 (CEST) Message-ID: <45129B84.9000208@pbnet.dk> Date: Thu, 21 Sep 2006 16:02:44 +0200 From: =?ISO-8859-1?Q?Poul_M=F8ller_Hansen?= User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: CachedRowSetXImpl() and PostgreSQL Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new-2.3.3 (20050822) (Debian) at care4all.dk X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.101 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO, SPF_NEUTRAL X-Spam-Level: * X-Archive-Number: 200609/79 X-Sequence-Number: 15797 I am having some trouble getting CachedRowSetXImpl() to work with postgresql-8.1-407.jdbc3.jar in this part of a SessionBean CachedRowSetXImpl crsx = new CachedRowSetXImpl(); crsx.setDataSourceName("java:comp/env/jdbc/MyDataSource"); crsx.setTableName("table"); crsx.setCommand("SELECT ALL id, url FROM my.table "); Getting the data is no problem, but when updating it's not using the correct tablename I have tried crsx.setTableName("my.table"); But then I get a "No columns in table" as this statement will not find the table "my.table": ----- 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 ----- It should have used the name "table" instead of "my.table" Without the schema name, I get a "relation not found. Then I tried adding this: crsx.setSchemaName("my"); But then It stops in an exception with no error message right after setting transaction level: ----- StandardContext[/MyApp]Error Description java.lang.RuntimeException at com.sun.data.provider.impl.CachedRowSetDataProvider.commitChanges(CachedRowSetDataProvider.java:878) ----- How is it possible getting it to work ? Thanks, Poul