Re: returning CHAR from C function

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Joe Conway <mail(at)joeconway(dot)com>
Cc: elein(at)varlena(dot)com, pgsql-general(at)postgresql(dot)org
Subject: Re: returning CHAR from C function
Date: 2002-12-01 04:39:42
Message-ID: 15416.1038717582@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Joe Conway <mail(at)joeconway(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2002-12-01 04:53:33 Re: Hard-coded PUBLIC in pg_dump
Previous Message David Wheeler 2002-12-01 04:24:17 Re: 7.4 Wishlist