Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id A92849FB58E for ; Fri, 22 Jun 2007 01:36:28 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 62970-07 for ; Fri, 22 Jun 2007 01:36:18 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from iplocks.co.jp (iplocks.co.jp [211.19.47.137]) by postgresql.org (Postfix) with SMTP id 9E4629FB556 for ; Fri, 22 Jun 2007 01:36:17 -0300 (ADT) Received: (qmail 9626 invoked from network); 22 Jun 2007 13:09:08 +0900 Received: from unknown (HELO EBIHARA) (220.221.255.7) by iplocks.co.jp with SMTP; 22 Jun 2007 13:09:08 +0900 From: "EBIHARA, Yuichiro" To: Subject: Re: standard LOB support Date: Fri, 22 Jun 2007 13:09:27 +0900 Message-ID: <019a01c7b483$2331f320$4a0aa8c0@ipljp.local> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.6822 In-Reply-To: <00e601c7b3c3$f9136160$4a0aa8c0@ipljp.local> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138 Thread-Index: AcezeDksYOH4nMhYR7e5F1YGc0ppXQASs16gAC54MqA= Importance: Normal X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.155 tagged_above=0 required=5 tests=AWL=0.154, BAYES_50=0.001 X-Spam-Level: X-Archive-Number: 200706/1295 X-Sequence-Number: 116118 Hi, I found my understanding was incorrect. > > > Is there any plan to support BLOB and CLOB in future releases? > > > > > Looking at the spec, and postgresql's implementation, I can't > > see much reason you couldn't just use a domain to declare that > > a bytea is a blob and varchar is a clob. > > That sounds a good idea! > My application accesses databases via JDBC and PostgreSQL > JDBC driver can handle 'bytea' as BLOB. I'm not sure if > 'text' is compatible with CLOB, but I guess it'll also work well. It seems like PG JDBC driver CANNOT handle 'bytea' as BLOB nor 'text' as CLOB. getBlob()/setBlob()/getClob()/setClob() can work with only Large Objects (at least with postgresql-8.1-405.jdbc3.jar). org.postgresql.util.PSQLException: Bad Integer Z\273\330x\336\335\226\243 at org.postgresql.jdbc1.AbstractJdbc1ResultSet.toInt(AbstractJdbc1ResultSet.java:862) at org.postgresql.jdbc1.AbstractJdbc1ResultSet.getInt(AbstractJdbc1ResultSet.java:287) at org.postgresql.jdbc3.Jdbc3ResultSet.getBlob(Jdbc3ResultSet.java:42) at PgTest.main(PgTest.java:33) The same exception occurs when using getClob() against a text column. Using Large Objects may solve my issue but I have to note that a large object is not automatically deleted when the record referring to it is deleted. Thanks, ebi