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


From: "Jan de Visser" <jdevisser(at)digitalfairway(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: TypeInfoCache
Date: 2007-12-20 01:39:29
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbc
On 12/19/07, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Oliver Jowett <oliver(at)opencloud(dot)com> writes:
> > Daniel Migowski wrote:
> >> I think a VARCHAR(50) and text are not interchangeable.
> > But a "varchar" (with no limit) and "text" *are* interchangeable, which
> > is why we identify text as VARCHAR
> But note that varchar-with-no-limit is itself a Postgres-ism: it's
> not allowed by the standard.

I was about to write the same thing. For educational value, this is
what a popular closed-source dbms will tell you:

SQL>  create table a ( a varchar );
 create table a ( a varchar )
ERROR at line 1:
xxx-00906: missing left parenthesis

SQL> create table a (a varchar(4001));
create table a (a varchar(4001))
ERROR at line 1:
xxx-00910: specified length too long for its datatype

SQL> create table a (a varchar(4000));

Table created.

That's right, textual data longer than 4000 characters needs to go
through the CLOB interface. And my license doesn't permit me to say
what that does to performance :)

So what Daniel is trying to say here is that Crystal Report probably
croaks on a column for the type is Types.VARCHAR but which does not
have a maximum length associated with it.

I think his patch is good.


In response to


pgsql-jdbc by date

Next:From: Kris JurkaDate: 2007-12-20 04:41:05
Subject: Re: TypeInfoCache
Previous:From: Tom LaneDate: 2007-12-20 01:25:44
Subject: Re: TypeInfoCache

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