From op217537@mail.telepac.pt Thu Nov 17 02:22:25 2005 X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id D37DED7FA3 for ; Wed, 16 Nov 2005 22:22:25 -0400 (AST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 89830-06 for ; Thu, 17 Nov 2005 02:22:28 +0000 (GMT) X-Greylist: delayed 00:06:34.586073 by SQLgrey- Received: from sapo.pt (relay6.ptmail.sapo.pt [212.55.154.26]) by svr1.postgresql.org (Postfix) with SMTP id CFD95D6853 for ; Wed, 16 Nov 2005 22:22:22 -0400 (AST) Received: (qmail 16767 invoked by uid 0); 17 Nov 2005 02:15:47 -0000 Received: from unknown (HELO sapo.pt) (10.134.35.156) by relay6 with SMTP; 17 Nov 2005 02:15:47 -0000 Received: (qmail 5094 invoked from network); 17 Nov 2005 02:15:46 -0000 X-AntiVirus: PTMail-AV 0.3.87.1 X-Virus-Status: Clean (0.01428 seconds) Received: from unknown (HELO [10.0.0.6]) (op217537@[81.193.155.57]) (envelope-sender ) by mta6 (qmail-ldap-1.03) with SMTP for ; 17 Nov 2005 02:15:46 -0000 Subject: Again the JSCreator and Metadata issues From: pedro farinha To: pgsql-jdbc@postgresql.org Content-Type: multipart/alternative; boundary="=-MpHlH3CYisY7e1N4O11b" Message-Id: <1132193745.6622.9.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Thu, 17 Nov 2005 02:15:45 +0000 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=2.865 required=5 tests=[DNS_FROM_RFC_ABUSE=0.479, DNS_FROM_RFC_POST=1.44, HTML_10_20=0.945, HTML_MESSAGE=0.001] X-Spam-Score: 2.865 X-Spam-Level: ** X-Archive-Number: 200511/109 X-Sequence-Number: 14207 --=-MpHlH3CYisY7e1N4O11b Content-Type: text/plain Content-Transfer-Encoding: 7bit Hi, I am testing the new JSC2 early access and I come across a old problem....getResultMetaData null values (I think). In JSC 1 the driver works fine but on this early access version it doesn't. I am posting what I think is relevant of the trace. I am not sure if this is a issue with the driver or the JSC it self so I am posting this into here as well as into the EAfeedback program. any ideas? psql Version is 8.0.1 JDBC postgresql-8.1-404.jdbc2ee.jar or postgresql-8.1-404.jdbc3.jar. java.lang.RuntimeException: java.sql.SQLException: Invalid column display size. Cannot be less than zero at com.sun.data.provider.impl.CachedRowSetDataProvider.getMetaData(CachedRowSetDataProvider.java:1299) at com.sun.data.provider.impl.CachedRowSetDataProvider.getFieldKeys(CachedRowSetDataProvider.java:485) at com.sun.rave.propertyeditors.binding.data.BindValueToDataProviderPanel.propertyChanged(BindValueToDataProviderPanel.java:415) at com.sun.rave.insync.live.LiveUnit.firePropertyChanged(LiveUnit.java:1755) (...) Caused by: java.sql.SQLException: Invalid column display size. Cannot be less than zero at javax.sql.rowset.RowSetMetaDataImpl.setColumnDisplaySize(RowSetMetaDataImpl.java:267) at com.sun.sql.rowset.CachedRowSetXImpl.initMetaData(CachedRowSetXImpl.java:872) at com.sun.sql.rowset.CachedRowSetXImpl.getMetaData(CachedRowSetXImpl.java:2337) at com.sun.data.provider.impl.CachedRowSetDataProvider.getMetaData(CachedRowSetDataProvider.java:1297) --=-MpHlH3CYisY7e1N4O11b Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit Hi,
I am testing the new JSC2 early access and I come across a old problem....getResultMetaData null values (I think).
In JSC 1 the driver works fine but on this early access version it doesn't.
I am posting what I think is relevant of the trace.
I am not sure if this is a issue with the driver or the JSC it self so I am posting this into here as well as into the EAfeedback program.

any ideas?

psql Version is 8.0.1 
JDBC postgresql-8.1-404.jdbc2ee.jar or postgresql-8.1-404.jdbc3.jar.

java.lang.RuntimeException: java.sql.SQLException: Invalid column display size. Cannot be less than zero
at com.sun.data.provider.impl.CachedRowSetDataProvider.getMetaData(CachedRowSetDataProvider.java:1299)
at com.sun.data.provider.impl.CachedRowSetDataProvider.getFieldKeys(CachedRowSetDataProvider.java:485)
at com.sun.rave.propertyeditors.binding.data.BindValueToDataProviderPanel.propertyChanged(BindValueToDataProviderPanel.java:415)
at com.sun.rave.insync.live.LiveUnit.firePropertyChanged(LiveUnit.java:1755)

(...)

Caused by: java.sql.SQLException: Invalid column display size. Cannot be less than zero
at javax.sql.rowset.RowSetMetaDataImpl.setColumnDisplaySize(RowSetMetaDataImpl.java:267)
at com.sun.sql.rowset.CachedRowSetXImpl.initMetaData(CachedRowSetXImpl.java:872)
at com.sun.sql.rowset.CachedRowSetXImpl.getMetaData(CachedRowSetXImpl.java:2337)
at com.sun.data.provider.impl.CachedRowSetDataProvider.getMetaData(CachedRowSetDataProvider.java:1297)

--=-MpHlH3CYisY7e1N4O11b-- From books@ejurka.com Fri Nov 18 18:38:15 2005 X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 43D7ADBAF5 for ; Fri, 18 Nov 2005 14:38:15 -0400 (AST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 69191-08 for ; Fri, 18 Nov 2005 18:38:14 +0000 (GMT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail63.csoft.net (leary3.csoft.net [63.111.22.74]) by svr1.postgresql.org (Postfix) with SMTP id DF4A0DBAEF for ; Fri, 18 Nov 2005 14:38:10 -0400 (AST) Received: (qmail 21396 invoked by uid 1112); 18 Nov 2005 18:41:01 -0000 Date: Fri, 18 Nov 2005 13:41:01 -0500 (EST) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: pedro farinha cc: pgsql-jdbc@postgresql.org Subject: Re: Again the JSCreator and Metadata issues In-Reply-To: <1132193745.6622.9.camel@localhost.localdomain> Message-ID: References: <1132193745.6622.9.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[AWL=0.000] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200511/114 X-Sequence-Number: 14212 On Thu, 17 Nov 2005, pedro farinha wrote: > I am testing the new JSC2 early access and I come across a old > problem....getResultMetaData null values (I think). In JSC 1 the driver > works fine but on this early access version it doesn't. I am posting > what I think is relevant of the trace. I am not sure if this is a issue > with the driver or the JSC it self so I am posting this into here as > well as into the EAfeedback program. > > java.lang.RuntimeException: java.sql.SQLException: Invalid column > display size. Cannot be less than zero > at > com.sun.data.provider.impl.CachedRowSetDataProvider.getMetaData(CachedRowSetDataProvider.java:1299) I believe you have a variable length field in your table. Sun's CachedRowSet implementation examines the ResultSetMetaData and creates its own copy of it. The postgresql JDBC driver returns -1 for ResultSetMetaData.getColumnDisplaySize() meaning unknown for variable length fields, like say a column of type "text". Sun does not like this value and reports an error. In the past we've tried to ask Sun for some advice in this area and got nothing in response. Other than -1 the only other real defensible value for getColumnDisplaySize would probably be Integer.MAX_VALUE. We've been concerned that GUIs would try to actually use this provided value and they would blow up, but the only complaints we've heard are from people disliking the -1 value and this problem doesn't seem to be going away. I suggest we try returning Integer.MAX_VALUE for a while and see what complaints we get. Objections? Kris Jurka From op217537@mail.telepac.pt Sat Nov 19 00:35:21 2005 X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id CE635DBB51 for ; Fri, 18 Nov 2005 20:35:21 -0400 (AST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 12315-10 for ; Sat, 19 Nov 2005 00:35:23 +0000 (GMT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sapo.pt (relay6.ptmail.sapo.pt [212.55.154.26]) by svr1.postgresql.org (Postfix) with SMTP id ACEB8D82C0 for ; Fri, 18 Nov 2005 20:35:18 -0400 (AST) Received: (qmail 8592 invoked by uid 0); 19 Nov 2005 00:35:17 -0000 Received: from unknown (HELO sapo.pt) (10.134.35.207) by relay6 with SMTP; 19 Nov 2005 00:35:17 -0000 Received: (qmail 30289 invoked from network); 19 Nov 2005 00:35:17 -0000 X-AntiVirus: PTMail-AV 0.3.87.1 X-Virus-Status: Clean (0.01714 seconds) Received: from unknown (HELO [10.0.0.6]) (op217537@[81.193.136.120]) (envelope-sender ) by mta12 (qmail-ldap-1.03) with SMTP for ; 19 Nov 2005 00:35:17 -0000 Subject: Re: Again the JSCreator and Metadata issues From: pedro farinha To: Kris Jurka Cc: "jdbc.postgres" In-Reply-To: References: <1132193745.6622.9.camel@localhost.localdomain> Content-Type: multipart/alternative; boundary="=-C2UbamHX6uL0Dy8B4a3p" Message-Id: <1132360517.3913.38.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Sat, 19 Nov 2005 00:35:17 +0000 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=1.426 required=5 tests=[AWL=0.480, HTML_10_20=0.945, HTML_MESSAGE=0.001] X-Spam-Score: 1.426 X-Spam-Level: * X-Archive-Number: 200511/121 X-Sequence-Number: 14219 --=-C2UbamHX6uL0Dy8B4a3p Content-Type: text/plain Content-Transfer-Encoding: 7bit Hi Kris, I have made a new post into the creator Feedback program, referring you're assumptions and solutions. Lets see if we can get any news from them before doing the changes, if any. I haven't tried it yet but I will try to verify that the problem is really related with "variable size fields". If it is we can always say "in order to use creator you must not use variable size fields". I will try to test with a table with all fields with fixed size, then with fields with variable size and see what I'll hit. On my post to the feedback program I raised the question of int.MAX_VALUE and what would be the impact of it. I also suggested a "default value" which while not correct may not impact much into the real implementation and also the magic number "0". What does it mean when you have a column with size = 0? . As you can see I am not very familiar with DB structures at all, thus the probably stupid question, what is the size of a "blob" column ? can it be fixed?. thanks for you're help. On Fri, 2005-11-18 at 18:41, Kris Jurka wrote: > On Thu, 17 Nov 2005, pedro farinha wrote: > > > I am testing the new JSC2 early access and I come across a old > > problem....getResultMetaData null values (I think). In JSC 1 the driver > > works fine but on this early access version it doesn't. I am posting > > what I think is relevant of the trace. I am not sure if this is a issue > > with the driver or the JSC it self so I am posting this into here as > > well as into the EAfeedback program. > > > > java.lang.RuntimeException: java.sql.SQLException: Invalid column > > display size. Cannot be less than zero > > at > > com.sun.data.provider.impl.CachedRowSetDataProvider.getMetaData(CachedRowSetDataProvider.java:1299) > > I believe you have a variable length field in your table. Sun's > CachedRowSet implementation examines the ResultSetMetaData and creates its > own copy of it. The postgresql JDBC driver returns -1 for > ResultSetMetaData.getColumnDisplaySize() meaning unknown for variable > length fields, like say a column of type "text". Sun does not like this > value and reports an error. In the past we've tried to ask Sun for some > advice in this area and got nothing in response. Other than -1 the > only other real defensible value for getColumnDisplaySize would > probably be Integer.MAX_VALUE. We've been concerned that GUIs would > try to actually use this provided value and they would blow up, but > the only complaints we've heard are from people disliking the -1 > value and this problem doesn't seem to be going away. > > I suggest we try returning Integer.MAX_VALUE for a while and see what > complaints we get. Objections? > > Kris Jurka > > ---------------------------(end of broadcast)--------------------------- > TIP 5: don't forget to increase your free space map settings --=-C2UbamHX6uL0Dy8B4a3p Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit Hi Kris,
I have made a new post into the creator Feedback program, referring you're assumptions and solutions. Lets see if we can get any news from them before doing the changes, if any.
I haven't tried it yet but I will try to verify that the problem is really related with "variable size fields". If it is we can always say "in order to use creator you must not use variable size fields".
I will try to test with a table with all fields with fixed size, then with fields with variable size and see what I'll hit.
On my post to the feedback program I raised the question of int.MAX_VALUE and what would be the impact of it. I also suggested a "default value" which while not correct may not impact much into the real implementation and also the magic number "0". What does it mean when you have a column with size = 0? . As you can see I am not very familiar with DB structures at all, thus the probably stupid question, what is the size of a "blob" column ? can it be fixed?.

thanks for you're help.


On Fri, 2005-11-18 at 18:41, Kris Jurka wrote:
On Thu, 17 Nov 2005, pedro farinha wrote:

> I am testing the new JSC2 early access and I come across a old 
> problem....getResultMetaData null values (I think). In JSC 1 the driver 
> works fine but on this early access version it doesn't. I am posting 
> what I think is relevant of the trace. I am not sure if this is a issue 
> with the driver or the JSC it self so I am posting this into here as 
> well as into the EAfeedback program.
>
> java.lang.RuntimeException: java.sql.SQLException: Invalid column
> display size. Cannot be less than zero
> at
> com.sun.data.provider.impl.CachedRowSetDataProvider.getMetaData(CachedRowSetDataProvider.java:1299)

I believe you have a variable length field in your table.  Sun's 
CachedRowSet implementation examines the ResultSetMetaData and creates its 
own copy of it.  The postgresql JDBC driver returns -1 for 
ResultSetMetaData.getColumnDisplaySize() meaning unknown for variable 
length fields, like say a column of type "text".  Sun does not like this 
value and reports an error.  In the past we've tried to ask Sun for some 
advice in this area and got nothing in response.  Other than -1 the 
only other real defensible value for getColumnDisplaySize would 
probably be Integer.MAX_VALUE.  We've been concerned that GUIs would 
try to actually use this provided value and they would blow up, but 
the only complaints we've heard are from people disliking the -1 
value and this problem doesn't seem to be going away.

I suggest we try returning Integer.MAX_VALUE for a while and see what 
complaints we get.  Objections?

Kris Jurka

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings
--=-C2UbamHX6uL0Dy8B4a3p-- From Kevin.Grittner@wicourts.gov Mon Nov 21 20:07:39 2005 X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id D34EBDA572 for ; Mon, 21 Nov 2005 16:07:39 -0400 (AST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 25016-05 for ; Mon, 21 Nov 2005 20:07:39 +0000 (GMT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from gwmta.wicourts.gov (gwmta.wicourts.gov [165.219.244.99]) by svr1.postgresql.org (Postfix) with ESMTP id 2B276DA3E9 for ; Mon, 21 Nov 2005 16:07:34 -0400 (AST) Received: from Courts-MTA by gwmta.wicourts.gov with Novell_GroupWise; Mon, 21 Nov 2005 13:46:32 -0600 Message-Id: <4381CFAE02000025000008B2@gwmta.wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 7.0 Date: Mon, 21 Nov 2005 13:46:22 -0600 From: "Kevin Grittner" To: , Cc: Subject: Re: Again the JSCreator and Metadata issues Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200511/136 X-Sequence-Number: 14234 No objection here -- I don't know how else to interpret the docs for this method, which is supposed to return: "the normal maximum number of characters allowed as the width of the designated column" Any GUI app should be prepared to truncate or wrap large values. -Kevin >>> Kris Jurka >>> On Thu, 17 Nov 2005, pedro farinha wrote: I believe you have a variable length field in your table. Sun's CachedRowSet implementation examines the ResultSetMetaData and creates its own copy of it. The postgresql JDBC driver returns -1 for ResultSetMetaData.getColumnDisplaySize() meaning unknown for variable length fields, like say a column of type "text". Sun does not like this value and reports an error. In the past we've tried to ask Sun for some advice in this area and got nothing in response. Other than -1 the only other real defensible value for getColumnDisplaySize would probably be Integer.MAX_VALUE. We've been concerned that GUIs would try to actually use this provided value and they would blow up, but the only complaints we've heard are from people disliking the -1 value and this problem doesn't seem to be going away. I suggest we try returning Integer.MAX_VALUE for a while and see what complaints we get. Objections? Kris Jurka ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings From books@ejurka.com Wed Nov 23 22:04:48 2005 X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 9762FDBAA1 for ; Wed, 23 Nov 2005 18:04:48 -0400 (AST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 88365-01 for ; Wed, 23 Nov 2005 22:04:49 +0000 (GMT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail63.csoft.net (leary3.csoft.net [63.111.22.74]) by svr1.postgresql.org (Postfix) with SMTP id AAED9DBAA0 for ; Wed, 23 Nov 2005 18:04:45 -0400 (AST) Received: (qmail 5456 invoked by uid 1112); 23 Nov 2005 22:01:11 -0000 Date: Wed, 23 Nov 2005 17:01:11 -0500 (EST) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: pedro farinha cc: pgsql-jdbc@postgresql.org Subject: Re: Again the JSCreator and Metadata issues In-Reply-To: Message-ID: References: <1132193745.6622.9.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[AWL=0.000] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200511/177 X-Sequence-Number: 14275 On Fri, 18 Nov 2005, Kris Jurka wrote: > [People don't like -1 for getColumnDisplaySize()] > > I suggest we try returning Integer.MAX_VALUE for a while and see what > complaints we get. Objections? > I've adjusted this in cvs. Please try out one of these jars and let us know how that works out. http://ejurka.com/pgsql/jars/pf/ Kris Jurka From op217537@mail.telepac.pt Fri Nov 25 01:12:32 2005 X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 02660DBCB0 for ; Thu, 24 Nov 2005 21:12:32 -0400 (AST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 60887-02 for ; Fri, 25 Nov 2005 01:12:35 +0000 (GMT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sapo.pt (relay2.ptmail.sapo.pt [212.55.154.22]) by svr1.postgresql.org (Postfix) with SMTP id DD757DBC82 for ; Thu, 24 Nov 2005 21:12:29 -0400 (AST) Received: (qmail 9863 invoked by uid 0); 25 Nov 2005 01:12:32 -0000 Received: from unknown (HELO sapo.pt) (10.134.35.155) by relay2 with SMTP; 25 Nov 2005 01:12:32 -0000 Received: (qmail 1521 invoked from network); 25 Nov 2005 01:12:32 -0000 X-AntiVirus: PTMail-AV 0.3.87.1 X-Virus-Status: Clean (0.05015 seconds) Received: from unknown (HELO [10.0.0.6]) (op217537@[81.193.155.155]) (envelope-sender ) by mta5 (qmail-ldap-1.03) with SMTP for ; 25 Nov 2005 01:12:32 -0000 Subject: Re: Again the JSCreator and Metadata issues From: pedro farinha To: Kris Jurka Cc: "jdbc.postgres" In-Reply-To: References: <1132193745.6622.9.camel@localhost.localdomain> Content-Type: multipart/alternative; boundary="=-0v+l80Liqau3YCoZ2DMK" Message-Id: <1132881150.5757.18.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Fri, 25 Nov 2005 01:12:31 +0000 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=1.673 required=5 tests=[AWL=-0.247, DNS_FROM_RFC_ABUSE=0.479, DNS_FROM_RFC_POST=1.44, HTML_MESSAGE=0.001] X-Spam-Score: 1.673 X-Spam-Level: * X-Archive-Number: 200511/199 X-Sequence-Number: 14297 --=-0v+l80Liqau3YCoZ2DMK Content-Type: text/plain Content-Transfer-Encoding: 7bit Hi Kris, The binding and display works fine with the postgresql-8.2dev-500pf.jdbc3.jar, I am using Java1.5 (Creator ships with it) so I didn't try neither the "EE" or jdbc2 version, but I reckon it should not be a problem Thanks for that. Can you tell me if this fix (if that) will be included in the cvs? or in a snapshot? I would like to make a reference to it on the Sun forum. One other issue: On the early-access feedback discussion there are some issues relating with changing the transaction isolation level in the middle of the transaction. You know anything about it? Matthias Jakob posted a solution/workaround, which is basically removing the exception. see below. Thanks again for fixing this. public void setTransactionIsolation(int level) throws SQLException { if (protoConnection.getTransactionState() != ProtocolConnection.TRANSACTION_IDLE) //throw new PSQLException(GT.tr("Cannot change transaction isolation level in the middle of a transaction."), // PSQLState.ACTIVE_SQL_TRANSACTION); System.out.println("Cannot change transaction isolation level in the middle of a transaction. Old TransactionIsolation "+getTransactionIsolation()+ " new unset TransactionIsolation "+level); String isolationLevelName = getIsolationLevelName(level); if (isolationLevelName == null) throw new PSQLException(GT.tr("Transaction isolation level {0} not supported.", new Integer(level)), PSQLState.NOT_IMPLEMENTED); String isolationLevelSQL = "SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL " + isolationLevelName; execSQLUpdate(isolationLevelSQL); // nb: no BEGIN triggered } On Wed, 2005-11-23 at 22:01, Kris Jurka wrote: > On Fri, 18 Nov 2005, Kris Jurka wrote: > > > [People don't like -1 for getColumnDisplaySize()] > > > > I suggest we try returning Integer.MAX_VALUE for a while and see what > > complaints we get. Objections? > > > > I've adjusted this in cvs. Please try out one of these jars and let us > know how that works out. > > http://ejurka.com/pgsql/jars/pf/ > > Kris Jurka > > ---------------------------(end of broadcast)--------------------------- > TIP 1: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly --=-0v+l80Liqau3YCoZ2DMK Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit Hi Kris,
The binding and display works fine with the postgresql-8.2dev-500pf.jdbc3.jar, I am using Java1.5 (Creator ships with it) so I didn't try neither the "EE" or jdbc2 version, but I reckon it should not be a problem
Thanks for that.

Can you tell me if this fix (if that) will be included in the cvs? or in a snapshot? I would like to make a reference to it on the Sun forum.

One other issue:
On the early-access feedback discussion there are some issues relating with changing the transaction isolation level in the middle of the transaction. You know anything about it?

Matthias Jakob posted a solution/workaround, which is basically removing the exception. see below.

Thanks again for fixing this.


public void setTransactionIsolation(int level) throws SQLException
{
if (protoConnection.getTransactionState() != ProtocolConnection.TRANSACTION_IDLE)
//throw new PSQLException(GT.tr("Cannot change transaction isolation level in the middle of a transaction."),
// PSQLState.ACTIVE_SQL_TRANSACTION);
System.out.println("Cannot change transaction isolation level in the middle of a transaction. Old TransactionIsolation "+getTransactionIsolation()+
" new unset TransactionIsolation "+level);

String isolationLevelName = getIsolationLevelName(level);
if (isolationLevelName == null)
throw new PSQLException(GT.tr("Transaction isolation level {0} not supported.", new Integer(level)), PSQLState.NOT_IMPLEMENTED);

String isolationLevelSQL = "SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL " + isolationLevelName;
execSQLUpdate(isolationLevelSQL); // nb: no BEGIN triggered
}


On Wed, 2005-11-23 at 22:01, Kris Jurka wrote:
On Fri, 18 Nov 2005, Kris Jurka wrote:

> [People don't like -1 for getColumnDisplaySize()]
>
> I suggest we try returning Integer.MAX_VALUE for a while and see what 
> complaints we get.  Objections?
>

I've adjusted this in cvs.  Please try out one of these jars and let us 
know how that works out.

http://ejurka.com/pgsql/jars/pf/

Kris Jurka

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to majordomo@postgresql.org so that your
       message can get through to the mailing list cleanly
--=-0v+l80Liqau3YCoZ2DMK-- From books@ejurka.com Fri Nov 25 05:54:22 2005 X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id AAE40DBA06 for ; Fri, 25 Nov 2005 01:54:22 -0400 (AST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 44212-02 for ; Fri, 25 Nov 2005 05:54:21 +0000 (GMT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail63.csoft.net (leary3.csoft.net [63.111.22.74]) by svr1.postgresql.org (Postfix) with SMTP id EC70BDB8FE for ; Fri, 25 Nov 2005 01:54:19 -0400 (AST) Received: (qmail 24956 invoked by uid 1112); 25 Nov 2005 05:57:25 -0000 Date: Fri, 25 Nov 2005 00:57:25 -0500 (EST) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: pedro farinha cc: "jdbc.postgres" Subject: Re: Again the JSCreator and Metadata issues In-Reply-To: <1132881150.5757.18.camel@localhost.localdomain> Message-ID: References: <1132193745.6622.9.camel@localhost.localdomain> <1132881150.5757.18.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[AWL=0.000] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200511/200 X-Sequence-Number: 14298 On Fri, 25 Nov 2005, pedro farinha wrote: > Can you tell me if this fix (if that) will be included in the cvs? or in > a snapshot? I would like to make a reference to it on the Sun forum. Yes, this has been added in cvs, but I've yet to produce a new development release. Due to some other driver events I'll put out a new dev release on the official website in the next few days. > One other issue: > On the early-access feedback discussion there are some issues relating > with changing the transaction isolation level in the middle of the > transaction. You know anything about it? > See this message for an explanation: http://archives.postgresql.org/pgsql-jdbc/2005-11/msg00112.php I believe the spec suggested deferring the changing of isolation levels until the next transaction begins, but we decided that could mask serious coding errors because the isolation level wasn't actually changing at the time of the call. Revisiting this is an option, but it still seems like a bad idea to me. Kris Jurka