Re: [GENERAL] interaction with postgres defined types in custom c functions

2007-07-17 Thread Gregory Stark
"Jason Nerothin" <[EMAIL PROTECTED]> writes: > PG_FUNCTION_INFO_V1(par); > Datum par(PG_FUNCTION_ARGS) // pete and repeat! takes text struct pointer > { > text *t = PG_GETARG_TEXT_P(0); > text *new_t = (text*) palloc(VARSIZE(t)); > VARATT_SIZEP(new_t) = VARSIZE(t); > memcpy((void*) VARDATA

[GENERAL] interaction with postgres defined types in custom c functions

2007-07-17 Thread Jason Nerothin
I'm experiencing much trouble making use of the V1 custom c function definition framework built into postgres, probably by virtue of my lack of experience with C. In a nutshell, I've paid close attention to the documentation, have had some success getting useful code out of the version 0 naming c