Thread: TEXT blob extraction in ecpg

TEXT blob extraction in ecpg

From
"none none"
Date:
Does any one know how to properly extract a TEXT type blob (undefined char 
length) in ecpg (Linux system)?  We are converting our SQL from Informix to 
PostGres.  Informix had a specific struct defined and I believe handled the 
dynamic memory allocation, but I cannot find any guidance on this issue for 
PostGres.  Anyone have any suggestions?

Thanks,

Tom




Re: TEXT blob extraction in ecpg

From
Michael Fuhr
Date:
On Mon, Jan 10, 2005 at 01:02:00PM -0500, none none wrote:

> Does any one know how to properly extract a TEXT type blob (undefined char 
> length) in ecpg (Linux system)?

If you don't know how much memory to allocate for a column, you
could use a descriptor area and check RETURNED_OCTET_LENGTH.  See
the "Using SQL Descriptor Areas" section in the ECPG documentation.

-- 
Michael Fuhr
http://www.fuhr.org/~mfuhr/