Re: C function accepting/returning cstring vs. text - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: C function accepting/returning cstring vs. text
Date
Msg-id 20100127155311.GC3559@alvh.no-ip.org
Whole thread Raw
In response to Re: C function accepting/returning cstring vs. text  (Ivan Sergio Borgonovo <mail@webthatworks.it>)
List pgsql-hackers
Ivan Sergio Borgonovo wrote:
> On Wed, 27 Jan 2010 11:49:46 -0300
> Alvaro Herrera <alvherre@commandprompt.com> wrote:
> 
> > > There are a lot of functions in contrib taking cstring input and
> > > returning cstring output.
> > > Are they just in the same "special" class of [type]in, [type]out
> > > [type]recv... functions?
> 
> > Probably, but I didn't check.
> 
> Does this nearly translate to:
> "nothing you should care about right now and anyway just functions
> that won't return results to SQL"?

I meant "they are almost certainly in the same class as typein and
typeout, but I didn't check every single one of them".

As far as I can tell you are not writing an output function, but
rather a debugging function of sorts.  I see no reason to return cstring.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Patch: psql \whoami option
Next
From: KaiGai Kohei
Date:
Subject: Re: [BUG?] strange behavior in ALTER TABLE ... RENAME TO on inherited columns