Re: [GENERAL] Problems converting between C string and Datum

2006-09-20 Thread Martijn van Oosterhout
On Wed, Sep 20, 2006 at 11:19:29AM -0400, Jack Orenstein wrote: > Thanks for all your help with the memory management problems. Next > problem: I'm having problems converting from a char* to a Datum and back > again. > > I have a char* which I need as a Datum, for use with a plan returned > from S

Re: [GENERAL] Problems converting between C string and Datum

2006-09-20 Thread Tom Lane
"Jack Orenstein" <[EMAIL PROTECTED]> writes: > I have a char* which I need as a Datum, for use with a plan returned > from SPI_prepare, so I'm doing this: > char* string; > Datum d; > ... > d = DirectFunctionCall1(textin, CStringGetDatum(string)); > ... > ereport(WARNING, (

[GENERAL] Problems converting between C string and Datum

2006-09-20 Thread Jack Orenstein
Thanks for all your help with the memory management problems. Next problem: I'm having problems converting from a char* to a Datum and back again. I have a char* which I need as a Datum, for use with a plan returned from SPI_prepare, so I'm doing this: char* string; Datum d; ... d =