pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
TEXT blob extraction in ecpg
2+ messages / 2 participants
[nested] [flat]

* TEXT blob extraction in ecpg
@ 2005-01-10 18:02 none none <mytofi@hotmail.com>
  2005-01-10 21:09 ` Re: TEXT blob extraction in ecpg Michael Fuhr <mike@fuhr.org>
  0 siblings, 1 reply; 2+ messages in thread

From: none none @ 2005-01-10 18:02 UTC (permalink / raw)
  To: pgsql-sql

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





^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: TEXT blob extraction in ecpg
  2005-01-10 18:02 TEXT blob extraction in ecpg none none <mytofi@hotmail.com>
@ 2005-01-10 21:09 ` Michael Fuhr <mike@fuhr.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Michael Fuhr @ 2005-01-10 21:09 UTC (permalink / raw)
  To: none none <mytofi@hotmail.com>; +Cc: pgsql-sql

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/



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2005-01-10 21:09 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-01-10 18:02 TEXT blob extraction in ecpg none none <mytofi@hotmail.com>
2005-01-10 21:09 ` Michael Fuhr <mike@fuhr.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox