> So I assume use of this is 'safe'? Any degridation on performance?
Hmm.. I believe it isn't standard...
> It appears that this datatype is also array compatible, CREATE TABLE
test3(a
> "char"[4]); works!
>
> I guess if space is so important, I could also just store
> (char[0]<<8|char[1]) into a smallint...
It's often better use int4(8) than char(1) as (primary) keys.
pros: int4 uses _less_ space, not affected by locales, operations are
surely -faster-. Larger range of values. I believe even int8 is faster
than char(1) and not many applications are ever going to exhaust 2^63
keyvalues.
cons: integer values often aren't quite mnemonic.
--
Antti Haapala