Re: Single Byte values
От | Antti Haapala |
---|---|
Тема | Re: Single Byte values |
Дата | |
Msg-id | Pine.GSO.4.44.0304051408400.10368-100000@paju.oulu.fi обсуждение исходный текст |
Ответ на | Re: Single Byte values (Jason Hihn <jhihn@paytimepayroll.com>) |
Ответы |
Re: Single Byte values
|
Список | pgsql-general |
> 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
В списке pgsql-general по дате отправления: