Adrian Schreyer <[email protected]> writes:
> The actual C++ function looks roughly like this

> extern "C"
> char *function(bytea *b)
> {
>    string ism;
>    [...]
>    return ism.c_str();
> }

My C++ is pretty rusty, but is the pointer returned by c_str() still
valid after the string variable goes out of scope?  I'm wondering if you
need a pstrdup before returning.

                        regards, tom lane

-- 
Sent via pgsql-general mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to