Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 73D5B9FB600 for ; Fri, 22 Jun 2007 04:06:27 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 52903-04-3 for ; Fri, 22 Jun 2007 04:06:21 -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 15BD99FBFF2 for ; Fri, 22 Jun 2007 04:06:22 -0300 (ADT) Received: (qmail 15964 invoked from network); 22 Jun 2007 16:05:54 +0900 Received: from unknown (HELO EBIHARA) (220.221.255.7) by iplocks.co.jp with SMTP; 22 Jun 2007 16:05:54 +0900 From: "EBIHARA, Yuichiro" To: Subject: Re: standard LOB support Date: Fri, 22 Jun 2007 16:06:18 +0900 Message-ID: <01b101c7b49b$d4e645e0$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: <01a901c7b497$7776bc40$4a0aa8c0@ipljp.local> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138 Thread-Index: Ace0kQPHXOr5FeJwSgCiJaDn2F9i+wABAyMQAAE5ZkA= Importance: Normal X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.123 tagged_above=0 required=5 tests=AWL=0.122, BAYES_50=0.001 X-Spam-Level: X-Archive-Number: 200706/1300 X-Sequence-Number: 116123 Hi, > > I found that using getBinaryStream(), setBinaryStream(), > > getCharacterStream() > > and setCharacterStream() to handle LOBs across different DBMS > > is much more > > portable (and reliably) than using the Clob()/Blob() methods. > > According to JDBC 3.0 specifiction, those 4 methods may not > be compatible to BLOB/CLOB. Some databases may support them > to access LOB data but not all databases. > > But my target databases are, actually, only PostgreSQL, > Oracle and DB2 and there is no problem with PostgreSQL. Also, > according to the Oracle JDBC driver manual, Oracle supports > stream access to LOB through the 4 methods. > > I'll also try DB2 soon. DB2 is ok too! According to manuals, both of Oracle and DB2 support getBytes()/setBytes()/getBinaryStream()/setBinaryStream() for BLOB and getString()/setString()/getCharacterStream()/setCharacterStream() for CLOB. Therefore, I can develop portable JDBC applications with LOB by using those methods and bytea/text data types on PostgreSQL. In addition, I can use DDL scripts including BLOB/CLOB with PostgreSQL too if I define domains as follows. CREATE DOMAIN BLOB AS BYTEA; CREATE DOMAIN CLOB AS TEXT; Tom, I also say thank you to you. But contrib/lo looks a little too much to me for this time. Thanks, ebi