Skip site navigation (1) Skip section navigation (2)

Re: TypeInfoCache

From: Daniel Migowski <dmigowski(at)ikoffice(dot)de>
To: pgsql-jdbc(at)postgresql(dot)org
Cc: Gregory Stark <stark(at)enterprisedb(dot)com>
Subject: Re: TypeInfoCache
Date: 2007-12-19 15:45:15
Message-ID: (view raw or whole thread)
Lists: pgsql-jdbc
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<body bgcolor="#ffffff" text="#000000">
Daniel Migowski schrieb:
<blockquote cite="mid:47693B10(dot)3040804(at)ikoffice(dot)de" type="cite">Gregory
Stark schrieb:
  <blockquote type="cite">"Daniel Migowski"
<a class="moz-txt-link-rfc2396E" href="mailto:dmigowski(at)ikoffice(dot)de">&lt;dmigowski(at)ikoffice(dot)de&gt;</a> writes:
    <blockquote type="cite">Hello dear developers,
I just updated the TypeInfoCache to return LONGVARCHAR for the
PostgreSQL Type
text. Currently VARCHAR(0) is returned, which seems not correct in my
eyes, and
confuses some major software packets like Chrystal Reports.
&nbsp;&nbsp;&nbsp; </blockquote>
Because VARCHAR (in my understanding) has some limit, like 256 or 50 or
even 8192, whatever. LONGVARCHAR is unlimited as I understand and much
better matches what i understood what "text" is for. While looking at
the JDBC specification "JSR-000221 JDBC 4.0 Final Release Evaluation",
they didn't make a clear statement on this, but AFAIK varchar always
carries a length with it. "text" does not, so its a LONGVARCHAR. It
doesn't matters, because all functions to get the data are equally
defined for both datatypes (spec page 199, table B-6).
At all, the driver returns a length of -1 for the "text" type, since
its no varchar type, and software using the metadata might expect to
get something &gt;0 for the length of a VARCHAR, like defined in the
SQL spec (don't know the page there, but the postgresql handbook says,
varchar without a parameter is a postgres extension).
With best regards,
Daniel Migowski
Btw, a varchar without length in PostgreSQL should be treated as
LONGVARCHAR, too, but i didn't implement that for now. <br>
With best regards,<br>
Daniel Migowski<br>
<div class="moz-signature">-- <br>
<pre> |&macr;&macr;|&macr;&macr;|    <b>IKOffice GmbH             Daniel Migowski</b>
 |  |  |/|                            Mail: <a
 |  | // |  Nordstr. 10               Tel.: +49 (441) 21 98 89 52
 |  | \\ |  26135 Oldenburg           Fax.: +49 (441) 21 98 89 55
 |__|__|\|  <a href=""></a>    Mob.: +49 (176) 22 31 20 76
            Gesch&auml;ftsf&uuml;hrer: Ingo Kuhlmann, Daniel Migowski
            Amtsgericht Oldenburg, HRB 201467
            Steuernummer: 64/211/01864</pre>

Attachment: unknown_filename
Description: text/html (2.6 KB)

In response to

pgsql-jdbc by date

Next:From: Tom LaneDate: 2007-12-19 15:48:45
Subject: Re: setting PreparedStatement parameter using "at time zone interval ?"
Previous:From: Daniel MigowskiDate: 2007-12-19 15:38:56
Subject: Re: TypeInfoCache

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group