Re: [GENERAL] Using a composite SQL type in C

2008-05-08 Thread Dan Myers
Toby Chavez wrote: Check the documentation about using composite-type arguments in C http://www.postgresql.org/docs/8.2/static/xfunc-c.html#AEN37402 [...] A quick google search brought up this tutorial that might help http://linuxgazette.net/142/peterson.html Cheers I found the documentat

Re: [GENERAL] Using a composite SQL type in C

2008-05-08 Thread Toby Chavez
Check the documentation about using composite-type arguments in C http://www.postgresql.org/docs/8.2/static/xfunc-c.html#AEN37402 You can use GetAttributeByNum() or GetAttributeByName() to get each value from your custom type. You will need to get the HeapTupleHeader first by calling PG_GETARG_HEA