Search Postgresql Archives

Re: Boolean type storage format

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/01/2012 02:25 AM, Mike Christensen wrote:
> It would also matter what columns were next to it, correct?
It doesn't look like PostgreSQL packs booleans. It still matters what's
next to it because of the alignment requirements of other data types,
but you still have a minimum of one byte per boolean. See:

regress=> SELECT pg_column_size( ROW('t'::boolean) );
 pg_column_size
----------------
             25
(1 row)

regress=> SELECT pg_column_size( ROW('t'::boolean, 't'::boolean) );
 pg_column_size
----------------
             26
(1 row)

regress=> SELECT pg_column_size( ROW('t'::boolean, 't'::boolean,
'f'::boolean, 't'::boolean) );
 pg_column_size
----------------
             28
(1 row)

--
Craig Ringer


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux