Re: Fixed length data types issue - Mailing list pgsql-hackers

From Gregory Stark
Subject Re: Fixed length data types issue
Date
Msg-id 871wqhv1j9.fsf@enterprisedb.com
Whole thread Raw
In response to Re: Fixed length data types issue  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: Fixed length data types issue  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
Alvaro Herrera <alvherre@commandprompt.com> writes:

> Gregory Stark wrote:
>> 
>> Well "char" doesn't have quite the same semantics as CHAR(1). If that's the
>> consensus though then I can work on either fixing "char" semantics to match
>> CHAR(1) or adding a separate type instead.
>
> What semantics?  

The main bit that comes to mind is 32::CHAR(1) give you '3' but 32::"char"
gives you ' '.

Really it makes more sense if you think of "char" is a 1 byte integer type
with some extra text casts and operators to make C programmers happy, not a 1
byte character type.

--  Gregory Stark EnterpriseDB          http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Gregory Stark
Date:
Subject: Re: Optimizer improvements: to do or not to do?
Next
From: Stefan Kaltenbrunner
Date:
Subject: Re: -HEAD planner issue wrt hash_joins on dbt3 ?