Thread: How are NULLS stored on disk for PG 7.4?

How are NULLS stored on disk for PG 7.4?

From
Arnold Mavromatis
Date:

Hi

How are column files in a table that have been assigned null stored on disk in Postgresql 7.4?

Cheers
Arn
 

Re: How are NULLS stored on disk for PG 7.4?

From
Bruce Momjian
Date:
Arnold Mavromatis wrote:
> Hi
>
> How are column files in a table that have been assigned null stored on disk
> in Postgresql 7.4?

Each row has a bitmap showing all the NULL values on that row.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Re: How are NULLS stored on disk for PG 7.4?

From
Yannick Warnier
Date:
Le mar 13/01/2004 à 00:43, Bruce Momjian a écrit :
> Arnold Mavromatis wrote:
> > Hi
> >
> > How are column files in a table that have been assigned null stored on disk
> > in Postgresql 7.4?
>
> Each row has a bitmap showing all the NULL values on that row.

Is it the same for PG 7.3?

Yannick


Re: How are NULLS stored on disk for PG 7.4?

From
"scott.marlowe"
Date:
On Wed, 14 Jan 2004, Yannick Warnier wrote:

> Le mar 13/01/2004 à 00:43, Bruce Momjian a écrit :
> > Arnold Mavromatis wrote:
> > > Hi
> > >
> > > How are column files in a table that have been assigned null stored on disk
> > > in Postgresql 7.4?
> >
> > Each row has a bitmap showing all the NULL values on that row.
>
> Is it the same for PG 7.3?

Yes, Postgresql has done this for quite some time.


Re: How are NULLS stored on disk for PG 7.4?

From
vhikida@inreach.com
Date:
> On Wed, 14 Jan 2004, Yannick Warnier wrote:
>
>> Le mar 13/01/2004 à 00:43, Bruce Momjian a écrit :
>> > Arnold Mavromatis wrote:
>> > > Hi
>> > >
>> > > How are column files in a table that have been assigned null stored
>> on disk
>> > > in Postgresql 7.4?
>> >
>> > Each row has a bitmap showing all the NULL values on that row.
>>
>> Is it the same for PG 7.3?
>
> Yes, Postgresql has done this for quite some time.
>
My understanding is that Oracle has a field showing the size of the column
prior to each column. A column size of of zero means that the column is
null.

I assume that this is why Oracle is unable to make a distinction between a
null and a zero length string but that PostgreSQL can?

Vincent

Re: How are NULLS stored on disk for PG 7.4?

From
Jan Wieck
Date:
Yannick Warnier wrote:

> Le mar 13/01/2004 à 00:43, Bruce Momjian a écrit :
>> Arnold Mavromatis wrote:
>> > Hi
>> >
>> > How are column files in a table that have been assigned null stored on disk
>> > in Postgresql 7.4?
>>
>> Each row has a bitmap showing all the NULL values on that row.
>
> Is it the same for PG 7.3?

It has always been that way. But the bitmap is only there if there is at
least one NULL value. One bit in the tuple headers flags tells if there
is a bitmap or not.


Jan

--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #