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

From Tom Lane
Subject Re: returning CHAR from C function
Date
Msg-id 15416.1038717582@sss.pgh.pa.us
Whole thread Raw
In response to Re: returning CHAR from C function  (Joe Conway <mail@joeconway.com>)
List 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 by date:

Previous
From: Nicolai Tufar
Date:
Subject: Re: Segmentation fault while COPY in 7.3
Next
From: Tom Lane
Date:
Subject: Re: Segmentation fault while COPY in 7.3