[GENERAL] Accessing composite type columns from C

2008-01-17 Thread Reg Me Please
Hi all.
Is there a way with the libpq to access subcolumns in a composite type 
column?
The documentation (8.2) seems not to mention this case.
Thanks.
-- 
Reg me, please!

---(end of broadcast)---
TIP 4: Have you searched our list archives?

   http://archives.postgresql.org/


Re: [GENERAL] Accessing composite type columns from C

2008-01-17 Thread Tom Lane
Reg Me Please [EMAIL PROTECTED] writes:
 Is there a way with the libpq to access subcolumns in a composite type 
 column?

libpq knows nothing in particular about composite columns.  You'd need
to parse out the data for yourself, per the syntax rules at
http://www.postgresql.org/docs/8.2/static/rowtypes.html#AEN5986

Depending on what you're doing, it might be better to expand the
column at the server side, ie, SELECT (ccol).* FROM ...

regards, tom lane

---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster


Re: [GENERAL] Accessing composite type columns from C

2008-01-17 Thread Merlin Moncure
On Jan 17, 2008 5:48 AM, Reg Me Please [EMAIL PROTECTED] wrote:
 Hi all.
 Is there a way with the libpq to access subcolumns in a composite type
 column?
 The documentation (8.2) seems not to mention this case.
 Thanks.
 --


We have a proposal to do this for 8.4.  We will probably maintain this
outside of the project for the 8.3 cycle (and it could be adapted to
8.2 very easily).  See:

http://archives.postgresql.org/pgsql-hackers/2008-01/msg00257.php

merlin

---(end of broadcast)---
TIP 4: Have you searched our list archives?

   http://archives.postgresql.org/