Thread: FEATURE REQUEST: let arrays support null values.

FEATURE REQUEST: let arrays support null values.

From
"ezra epstein"
Date:
I've stumbled against the inability to put null values within an array.  The
PostgreSQL User's Guide on the subject states in part:

    <<A limitation of the present array implementation is that individual
elements of an array cannot be SQL null values. The entire array can be set
to null, but you can't have an array with some elements null and some not.>>
    http://www.postgresql.org/docs/current/static/arrays.html#AEN5117

Are there any plans to remove that limitation?  An pointers to where in the
code I might start to look if I want to enhance this on my own?

Thanks,

Ezra Epstein



Re: FEATURE REQUEST: let arrays support null values.

From
Tom Lane
Date:
"ezra epstein" <ee_newsgroup_post@prajnait.com> writes:
> I've stumbled against the inability to put null values within an array.
> Are there any plans to remove that limitation?

It's on the TODO list.  I think Joe Conway has made noises about doing
something about it, but I dunno if he expects to get to it during the
7.5 development cycle or not.

> An pointers to where in the code I might start to look if I want to
> enhance this on my own?

The array code is mostly in

src/include/utils/array.h
src/backend/utils/adt/arrayfuncs.c
src/backend/utils/adt/array_userfuncs.c
src/backend/utils/adt/arrayutils.c

            regards, tom lane