Re: Boolean type storage format

From: Mike Christensen <mike(at)kitchenpc(dot)com>
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-10-31 18:25:26
Message-ID: CABs1bs15f_cnEbkDrnt89fnuCM0QbS0HqroAmkjUCw9m8Tq13Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

It would also matter what columns were next to it, correct?

For example, if you had 4 bools in a row, that could also be 1 byte..

On Wed, Oct 31, 2012 at 11:08 AM, Raghavendra <
raghavendra(dot)rao(at)enterprisedb(dot)com> wrote:

> On Wed, Oct 31, 2012 at 8:52 PM, Alexander Gataric <gataric(at)usa(dot)net>wrote:
>
>> What is the data physically stored as for boolean type? I know that it is
>> one byte but is it char, int, or something else?
>>
>
>
> False represented by zero bytes and True by 1 byte with value 1.
>
> ---
> Regards,
> Raghavendra
> EnterpriseDB Corporation
> Blog: http://raghavt.blogspot.com/
>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2012-10-31 18:34:19 Re: dropdb breaks replication?
Previous Message Lonni J Friedman 2012-10-31 18:09:27 Re: dropdb breaks replication?