Null as array element - Mailing list pgsql-general

From Amin Abdulghani
Subject Null as array element
Date
Msg-id 5.1.0.14.0.20010724150024.00abfeb8@mail.quantiva.com
Whole thread Raw
List pgsql-general
Hi,

I have recently been playing around with the array data types. My
objective is to use Postgress to store sparse arrays.
  One of the things that I noticed is that I can't store null as a value
for an element of an array. So for example if I have a column A of type
text[] and  the values for this column are set to {"val1",null,"val2",,"val3"},
then I would have A[1]="val1", A[2]="null", A[3]="val2", A4="" (empty string),
A[5]="val3". What I am guessing from this  is that each element is
actually taking up space. I am wondering whether there is a better way
to approach this to store sparse arrays.

Thanks..
Amin


pgsql-general by date:

Previous
From: GH
Date:
Subject: Re: Postmaster won't start.
Next
From: missive@frontiernet.net (Lee Harr)
Date:
Subject: Re: pqReadData() -- backend closed the channel unexpectedly.