Re: returning CHAR from C function - Mailing list pgsql-general

From elein
Subject Re: returning CHAR from C function
Date
Msg-id 200212010034.gB10YdAQ432502@pimout4-ext.prodigy.net
Whole thread Raw
In response to Re: returning CHAR from C function  (Joe Conway <mail@joeconway.com>)
List pgsql-general
Joe,

Thank you for your confirmation.   It sounds like a bug to
me even with the work around.  I'll report it.

elein

On Saturday 30 November 2002 15:56, Joe Conway wrote:
> Joe Conway wrote:
> > instead of type 18 (==char), which is what you need (and intended). I'm
> > not sure what the proper way to define a function returning type char
> > is
>
> As a follow up, this works:
>
> create OR REPLACE function retchar(text)
> returns "char"
> as '$libdir/retchar.so'
> language 'c';
>
> The quotes must prevent the typename from being rewritten to bpchar.
>
> HTH,
>
> Joe
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster

--
----------------------------------------------------------------------------------------
elein@varlena.com     Database Consulting     www.varlena.com
              I have always depended on the [QA] of strangers.

pgsql-general by date:

Previous
From: Joe Conway
Date:
Subject: Re: returning CHAR from C function
Next
From: "Nicolai Tufar"
Date:
Subject: Segmentation fault while COPY in 7.3