Re: proposal: lob conversion functionality - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: proposal: lob conversion functionality
Date
Msg-id CAFj8pRDPb_47OxSW3EOL7idRWDs4n=WuVimn8nUhB9TagKj5iA@mail.gmail.com
Whole thread Raw
In response to Re: proposal: lob conversion functionality  (Jim Nasby <jim@nasby.net>)
List pgsql-hackers



2013/8/21 Jim Nasby <jim@nasby.net>
On 8/12/13 1:08 PM, Pavel Stehule wrote:
   IF (bytes != LENGTH($1)) THEN
     RAISE EXCEPTION 'Not all data copied to blob';
   END IF;
   PERFORM lo_close(fd);

FWIW, it's probably better to close before raising the exception...

it should to be done automatically - lo handler is released after transaction end

Pavel
 
--
Jim C. Nasby, Data Architect                       jim@nasby.net
512.569.9461 (cell)                         http://jim.nasby.net

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: docbook-xsl version for release builds
Next
From: Tom Lane
Date:
Subject: Re: CAST Within EXCLUSION constraint