5 messages in org.postgresql.pgsql-jdbcRe: Fwd: Diffrence between 8.0.3 and ...
FromSent OnAttachments
Yann PICHOTJul 3, 2006 8:19 am 
Kris JurkaJul 3, 2006 8:42 am 
Yann PICHOTJul 4, 2006 11:56 pm 
Kris JurkaJul 5, 2006 12:31 pm 
Yann PICHOTJul 6, 2006 6:16 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: Fwd: Diffrence between 8.0.3 and 8.1.3Actions...
From:Yann PICHOT (ypic@gmail.com)
Date:Jul 6, 2006 6:16:45 am
List:org.postgresql.pgsql-jdbc

2006/7/5, Kris Jurka <boo@ejurka.com>:

On Wed, 5 Jul 2006, Yann PICHOT wrote:

When i use this SQL request : SELECT col1, cast(' ' as varchar(3)) as mycol FROM mytable, getColumnDisplaySize return -5. When i use this SQL request : SELECT col1, cast(' ' as varchar(3)) as mycol, getColumnDisplaySize return 3 !!!!

OK, I misunderstood your test case and was only looking at the second version which works. As you noted earlier the server is responding with a different typmod value, so this is not a JDBC problem, but a server regression and I've forwarded this on to the -bugs list. To summarize for them:

In 8.0 "SELECT ' '::varchar(3) FROM tab" retained the typmod value specified in the query, but in 8.1 it is lost and -1 is used instead.

Thanks, i'll follow the problem in the bug list.