Re: int1? types? - Mailing list pgsql-general

From Joe Conway
Subject Re: int1? types?
Date
Msg-id 3F875CA8.8020009@joeconway.com
Whole thread Raw
In response to Re: int1? types?  (elein <elein@varlena.com>)
List pgsql-general
elein wrote:
> The "char" type has special handling built into the server
> if I recall correctly and that is part of the reason it
> does not behave correctly in some cases.  But I think it is
> still schlepped around as a DATUM which is a four byte value.
>
> What I meant was a user defined single byte data type.
> I don't think it can be done since it needs to be packaged
> as a DATUM.

No, "char" is exactly one byte. See the doc, or the source:

http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/utils/adt/char.c?rev=1.38&content-type=text/x-cvsweb-markup

Joe




pgsql-general by date:

Previous
From: elein
Date:
Subject: Re: int1? types?
Next
From: Manfred Koizar
Date:
Subject: Re: int1? types?