Re: returning CHAR from C function

Поиск
Список
Период
Сортировка
От Joe Conway
Тема Re: returning CHAR from C function
Дата
Msg-id 3DE95037.4030701@joeconway.com
обсуждение исходный текст
Ответ на Re: returning CHAR from C function  (Joe Conway <mail@joeconway.com>)
Ответы Re: returning CHAR from C function  (elein <elein@sbcglobal.net>)
Re: returning CHAR from C function  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Joe Conway
Дата:
Сообщение: Re: returning CHAR from C function
Следующее
От: elein
Дата:
Сообщение: Re: returning CHAR from C function