Re: Text <-> C string

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "Brendan Jurd" <direvus(at)gmail(dot)com>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Text <-> C string
Date: 2007-09-21 20:33:38
Message-ID: 873ax7rc65.fsf@oxford.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches


"Brendan Jurd" <direvus(at)gmail(dot)com> writes:

> On 9/22/07, Gregory Stark <stark(at)enterprisedb(dot)com> wrote:
>> The canonical way to do it is with
>>
>> DatumGetCString(DirectFunctionCall1(textout, t))
>
> Ah, I see. Thanks.
>
> In that case, would it be helpful if I submitted a patch for the
> various code fragments that do this locally, updating them to use
> DatumGetCString?

I would be interested in seeing just a list of such places if you have it
handy. I don't think we consider it wrong to violate the text data type
abstraction barrier like you describe though.

I'm interested because any such code is possibly either failing to take into
account toasted data or is unnecessarily detoasting packed varlenas.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Brendan Jurd 2007-09-21 20:39:21 Re: Text <-> C string
Previous Message Andrew Dunstan 2007-09-21 20:24:42 Re: like/ilike improvements

Browse pgsql-patches by date

  From Date Subject
Next Message Brendan Jurd 2007-09-21 20:39:21 Re: Text <-> C string
Previous Message Andrew Dunstan 2007-09-21 20:24:42 Re: like/ilike improvements