Re: [HACKERS] pstrdup(TextDatumGetCString(foo)) ?

2016-03-09 Thread Tom Lane
Chapman Flack writes: > I am encountering, here and there, an idiom like > pstrdup(TextDatumGetCString(foo)) > or a pre-8.4 version, > pstrdup(DatumGetCString(DirectFunctionCall1(textout, foo))) > It's leading me to question my sanity because it appears to me > that both text_to_cstring (un

[HACKERS] pstrdup(TextDatumGetCString(foo)) ?

2016-03-09 Thread Chapman Flack
I am encountering, here and there, an idiom like pstrdup(TextDatumGetCString(foo)) or a pre-8.4 version, pstrdup(DatumGetCString(DirectFunctionCall1(textout, foo))) It's leading me to question my sanity because it appears to me that both text_to_cstring (underlying TextDatumGetCString) and