Re: BLOBS

From: Jan de Visser <jdevisser(at)digitalfairway(dot)com>
To: "PostgreSQL JDBC Mailing List" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: BLOBS
Date: 2004-04-26 21:36:34
Message-ID: 200404261736.34288.jdevisser@digitalfairway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On April 26, 2004 11:54 am, David Wall wrote:
> n Oracle, we had to actually insert an empty_blob()
> and then follow that up with an SQL UPDATE to set the blob data.  I'm not
> sure why they need two SQL calls to insert a blob, but that's how it
> appears to "work" in Oracle.

OT for a postgresql list, but if you default the column to EMPTY_BLOB() you
don't have to do that:

...
myBlob BLOB DEFAULT EMPTY_BLOB(),
...

Oh, and have you had the cool one yet where you update a BLOB (or CLOB) with
less data then already in there and you end up with you new data plus the
'end' of the original BLOB? You need to reset w/ EMPTY_BLOB() prior to
updating a BLOB as well.

Oh, the suckiness of Oracle. Don't get me started.

JdV!!

--
--------------------------------------------------------------
Jan de Visser jdevisser(at)digitalfairway(dot)com

Baruk Khazad! Khazad ai-menu!
--------------------------------------------------------------

In response to

  • Re: BLOBS at 2004-04-26 15:54:29 from David Wall

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dave Cramer 2004-04-26 23:04:07 Re: [JDBC] is a good practice to create an index on the oid?
Previous Message Dave Cramer 2004-04-26 20:42:04 Re: [JDBC] loading data into postgresql became slow