Re: Null value representation in the array data structure

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Paul Laub" <plaub(at)incyte(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Null value representation in the array data structure
Date: 2001-11-06 19:27:51
Message-ID: 17331.1005074871@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Paul Laub" <plaub(at)incyte(dot)com> writes:
> 1. Is there a way of representing NULL numerical data
> in arrays I have overlooked?

Arrays don't cope with NULL elements at all (numerical or otherwise).
Fixing this is on the TODO list.

> 2. If not, are there workarounds more attractive than
> using a numerical flag value (e.g., -9999)? (That
> reminds me of FORTRAN 77 days long ago!)

Consider whether you really need an array at all. A lot of people
regard arrays as faintly raffish because they don't fit into the
relational worldview very well. Can you break the data down into
tables instead?

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Culley Harrelson 2001-11-06 19:56:29 functions vs embedded SQL
Previous Message wsheldah 2001-11-06 18:59:08 Re: Howto change column length