Re: Boolean type storage format

From: Marti Raudsepp <marti(at)juffo(dot)org>
To: Raghavendra <raghavendra(dot)rao(at)enterprisedb(dot)com>
Cc: Alexander Gataric <gataric(at)usa(dot)net>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Boolean type storage format
Date: 2012-11-01 13:41:30
Message-ID: CABRT9RB-OAPgfKu7Q3SczSSAjxn9d0E3bojPAvRZf_hK3EF1Ow@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Oct 31, 2012 at 8:08 PM, Raghavendra
<raghavendra(dot)rao(at)enterprisedb(dot)com> wrote:
> False represented by zero bytes and True by 1 byte with value 1.

This is not true AFAIK. Both boolean TRUE and FALSE values require 1 byte.

A NULL value is zero bytes (though it still consumes 1 bit in the null
bitmap). This is true for all types, not just boolean.

Regards,
Marti

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2012-11-01 13:41:51 Re: role does not exist
Previous Message Kevin Burton 2012-11-01 13:38:22 Re: role does not exist