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

From Joe Conway
Subject Re: returning CHAR from C function
Date
Msg-id 3DE95037.4030701@joeconway.com
Whole thread Raw
In response to Re: returning CHAR from C function  (Joe Conway <mail@joeconway.com>)
Responses Re: returning CHAR from C function  (elein <elein@sbcglobal.net>)
Re: returning CHAR from C function  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
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



pgsql-general by date:

Previous
From: Joe Conway
Date:
Subject: Re: returning CHAR from C function
Next
From: elein
Date:
Subject: Re: returning CHAR from C function