Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 8B0392E38F0 for ; Wed, 19 Dec 2007 21:39:37 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 84433-03 for ; Wed, 19 Dec 2007 21:39:26 -0400 (AST) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.178]) by postgresql.org (Postfix) with ESMTP id 409A42E3720 for ; Wed, 19 Dec 2007 21:39:30 -0400 (AST) Received: by wa-out-1112.google.com with SMTP id m38so5200539waf.5 for ; Wed, 19 Dec 2007 17:39:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=RGssZJ1sb69x7bklYJISXCBQljRZmIZk1CjYvzC48Q8=; b=XGajGZZaTvckWV+5DDbQbW40YXTxMOlqO5Tcad/G+vlaHduYgZWQqgSw2xgpvYbzU48oMIoySM7RvxVHLtejY3HLnv5CXVxdZgSbz/nVL6J+WGHW5u+LGiz3za3UaVdddiiPA/IezdD0UMw3MhymqxCYnIcgYUJwjR2JcOsD8og= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=UE+AC7G4JMv/zpjV6ReLBadZGuZ2HXkSr8QwIx+ozvUWUdfNqr+5WzXBXyTaZQJDh72j18Unx++u/2dgF+XVzX+NHeLRH7sittudVUylXR21lfwzSfRImygcDKAXlirKQg1F48+8mGB+jJVlAe/0LNDQOAHNIxBoYQxuV/EuA+o= Received: by 10.115.54.1 with SMTP id g1mr1627836wak.133.1198114769108; Wed, 19 Dec 2007 17:39:29 -0800 (PST) Received: by 10.115.92.14 with HTTP; Wed, 19 Dec 2007 17:39:29 -0800 (PST) Message-ID: <1159c1e90712191739p77fe2335odc1b883d2076c9a5@mail.gmail.com> Date: Wed, 19 Dec 2007 20:39:29 -0500 From: "Jan de Visser" To: pgsql-jdbc@postgresql.org Subject: TypeInfoCache In-Reply-To: <1159c1e90712191738m59819803vde25b489102a50af@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <47692DEB.9070307@ikoffice.de> <877ijan2cp.fsf@oxford.xeocode.com> <47693B10.3040804@ikoffice.de> <873atymzpu.fsf@oxford.xeocode.com> <4769604A.9050006@ikoffice.de> <476989C7.8020307@opencloud.com> <1811.1198113944@sss.pgh.pa.us> <1159c1e90712191738m59819803vde25b489102a50af@mail.gmail.com> X-Google-Sender-Auth: 9bf665b7e21e4033 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200712/156 X-Sequence-Number: 18011 On 12/19/07, Tom Lane wrote: > Oliver Jowett 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. jan