Re: BLOBS - Mailing list pgsql-jdbc

From Jan de Visser
Subject Re: BLOBS
Date
Msg-id 200404261736.34288.jdevisser@digitalfairway.com
Whole thread Raw
In response to Re: BLOBS  ("David Wall" <d.wall@computer.org>)
List 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@digitalfairway.com

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

pgsql-jdbc by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: default_with_oid
Next
From: Dave Cramer
Date:
Subject: Re: [GENERAL] loading data into postgresql became slow