Re: Text <-> C string - Mailing list pgsql-hackers

From Gregory Stark
Subject Re: Text <-> C string
Date
Msg-id 877imjrdq1.fsf@oxford.xeocode.com
Whole thread Raw
In response to Text <-> C string  ("Brendan Jurd" <direvus@gmail.com>)
Responses Re: Text <-> C string
Re: Text <-> C string
List pgsql-hackers
"Brendan Jurd" <direvus@gmail.com> writes:

> Surely having the exact same four lines of code written out in dozens
> of places is a Bad Thing, but perhaps there is some reasoning behind
> this that I am missing?

The canonical way to do it is with

DatumGetCString(DirectFunctionCall1(textout, t))


--  Gregory Stark EnterpriseDB          http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: HOT is applied
Next
From: "Brendan Jurd"
Date:
Subject: Re: Text <-> C string