How are NULLS stored on disk for PG 7.4?

Started by Arnold Mavromatisabout 22 years ago6 messagesgeneral
Jump to latest
#1Arnold Mavromatis
A.Mavromatis@bom.gov.au

Hi

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

Cheers
Arn

#2Bruce Momjian
bruce@momjian.us
In reply to: Arnold Mavromatis (#1)
Re: How are NULLS stored on disk for PG 7.4?

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
#3Yannick Warnier
ywarnier@beeznest.org
In reply to: Bruce Momjian (#2)
Re: How are NULLS stored on disk for PG 7.4?

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

#4scott.marlowe
scott.marlowe@ihs.com
In reply to: Yannick Warnier (#3)
Re: How are NULLS stored on disk for PG 7.4?

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.

#5Vincent Hikida
vhikida@inreach.com
In reply to: scott.marlowe (#4)
Re: How are NULLS stored on disk for PG 7.4?

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

#6Jan Wieck
JanWieck@Yahoo.com
In reply to: Yannick Warnier (#3)
Re: How are NULLS stored on disk for PG 7.4?

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 #