Re: returning CHAR from C function

From: Joe Conway <mail(at)joeconway(dot)com>
To: elein(at)varlena(dot)com
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: returning CHAR from C function
Date: 2002-11-30 23:56:39
Message-ID: 3DE95037.4030701@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joe Conway 2002-12-01 00:14:12 Re: 7.4 Wishlist
Previous Message Joe Conway 2002-11-30 23:46:42 Re: returning CHAR from C function