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