Thread: does the JDBC driver offer a similar property to the ODBC Text As LongVarchar?
does the JDBC driver offer a similar property to the ODBC Text As LongVarchar?
From
the6campbells
Date:
In the Postgres ODBC driver you can confirm Data Type Options:Text as LongVarChar = True and set Max properties for Varchar and LongVarChar.
I did not see if the JDBC driver is providing similar options in the recent 9.x drivers.
As-is, Postgres likes to describe the precision on character expressions as text 2147483647 which may make sense if the business data was to be a CLOB. But an application that is using the precision for other purposes will dislike the value. Hence, with ODBC you could change the way data was described/returned.
I did not see if the JDBC driver is providing similar options in the recent 9.x drivers.
As-is, Postgres likes to describe the precision on character expressions as text 2147483647 which may make sense if the business data was to be a CLOB. But an application that is using the precision for other purposes will dislike the value. Hence, with ODBC you could change the way data was described/returned.
Re: does the JDBC driver offer a similar property to the ODBC Text As LongVarchar?
From
Dave Cramer
Date:
Not that I am aware of, no.
Dave Cramer
dave.cramer(at)credativ(dot)ca
http://www.credativ.ca
Dave Cramer
dave.cramer(at)credativ(dot)ca
http://www.credativ.ca
On Mon, Nov 12, 2012 at 1:00 PM, the6campbells <the6campbells@gmail.com> wrote:
In the Postgres ODBC driver you can confirm Data Type Options:Text as LongVarChar = True and set Max properties for Varchar and LongVarChar.
I did not see if the JDBC driver is providing similar options in the recent 9.x drivers.
As-is, Postgres likes to describe the precision on character expressions as text 2147483647 which may make sense if the business data was to be a CLOB. But an application that is using the precision for other purposes will dislike the value. Hence, with ODBC you could change the way data was described/returned.
Re: does the JDBC driver offer a similar property to the ODBC Text As LongVarchar?
From
Kris Jurka
Date:
On Mon, 12 Nov 2012, the6campbells wrote: > In the Postgres ODBC driver you can confirm Data Type Options:Text as > LongVarChar = True and set Max properties for Varchar and LongVarChar. > > I did not see if the JDBC driver is providing similar options in the recent > 9.x drivers. The JDBC driver offers a connection option "unknownLength=XXXX" which can be set to return a fixed size instead of Integer.MAX_VALUE for fields of unknown length. This covers text fields, but does not apply exclusively to them. http://jdbc.postgresql.org/documentation/head/connect.html#connection-parameters Kris Jurka