Re: Fwd: [GENERAL] returning CHAR from C function

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: elein(at)varlena(dot)com
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Fwd: [GENERAL] returning CHAR from C function
Date: 2002-12-02 00:54:12
Message-ID: 3397.1038790452@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

elein <elein(at)sbcglobal(dot)net> writes:
> I think I do not know the background on this.

I think it's mostly historical. The one-byte "char" datatype seems to
date back to Berkeley days, long before there was any concern for SQL
compliance (it's there in Postgres 4.2). "bpchar" was apparently added
in Postgres95 in order to provide SQL-like functionality --- but they
didn't pay any attention to duplicating the SQL name for it. The
keyword CHARACTER was added later, translating it to the internal name
bpchar in the parser. Eventually the keyword CHAR was added too, and
translated.

The real question at this point is what would break if we renamed "char"
to "char1". Since it's used extensively in the system catalogs, I'm
sure there would be some unhappiness involved. I am dubious that
merely avoiding confusion is a sufficient reason to change.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Rod Taylor 2002-12-02 01:36:09 Re: contrib/adddepend does not properly re-create
Previous Message Tom Lane 2002-12-02 00:22:29 Re: contrib/adddepend does not properly re-create