Re: returning CHAR from C function

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: returning CHAR from C function
Дата
Msg-id 15416.1038717582@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: returning CHAR from C function  (Joe Conway <mail@joeconway.com>)
Список pgsql-general
Joe Conway <mail@joeconway.com> writes:
> As a follow up, this works:

> create OR REPLACE function retchar(text)
> returns "char"

Yes.  This is even documented in a reasonably prominent place, ie
the definition of "char" at the bottom of
http://www.ca.postgresql.org/users-lounge/docs/7.2/postgres/datatype-character.html

To wit: the single-byte char type must be spelled "char" (with the
double quotes), not char (which is defined by SQL92 as character(1),
a completely different type).

This is pretty ugly, but I don't see a way to migrate to something
less confusing without breaking lots of existing code.

            regards, tom lane

В списке pgsql-general по дате отправления:

Предыдущее
От: Nicolai Tufar
Дата:
Сообщение: Re: Segmentation fault while COPY in 7.3
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Segmentation fault while COPY in 7.3