Re: standard LOB support

From: "EBIHARA, Yuichiro" <ebihara(at)iplocks(dot)co(dot)jp>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Re: standard LOB support
Date: 2007-06-22 07:06:18
Message-ID: 01b101c7b49b$d4e645e0$4a0aa8c0@ipljp.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-jdbc

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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Thomas Kellerer 2007-06-22 07:11:00 Re: standard LOB support
Previous Message EBIHARA, Yuichiro 2007-06-22 06:34:58 Re: standard LOB support

Browse pgsql-jdbc by date

  From Date Subject
Next Message Thomas Kellerer 2007-06-22 07:11:00 Re: standard LOB support
Previous Message EBIHARA, Yuichiro 2007-06-22 06:34:58 Re: standard LOB support