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

From Tom Lane
Subject Re: Fixed length data types issue
Date
Msg-id 16552.1158181148@sss.pgh.pa.us
Whole thread Raw
In response to Re: Fixed length data types issue  (Mark Dilger <pgsql@markdilger.com>)
Responses Re: Fixed length data types issue  (Mark Dilger <pgsql@markdilger.com>)
List pgsql-hackers
Mark Dilger <pgsql@markdilger.com> writes:
> int1 works perfectly, as far as I can tell.  int3 works great in memory, 
> but can't be stored to a table.  The problem seems to be that 
> store_att_byval allows data of size 1 byte but not size 3 bytes, forcing 
> me to pass int3 by reference.  But when I pass either of these types by 
> reference the backend exits when trying to store to a table.

Please provide a stack trace --- AFAIK there shouldn't be any reason why
a pass-by-ref 3-byte type wouldn't work.  I'm wondering though what
alignment you expect it to have.  You'd need some pretty ugly code to
pick up an unaligned 3-byte integer portably ... but if you align it,
the space savings probably goes out the window.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Mark Dilger
Date:
Subject: Re: Fixed length data types issue
Next
From: Bruce Momjian
Date:
Subject: Patch attribution and non-ASCII characters