Re: Assignment to array elements

From: Greg Stark <gsstark(at)mit(dot)edu>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Assignment to array elements
Date: 2004-06-09 15:49:12
Message-ID: 87smd4viiv.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:

> What I would like to do about this is define INSERT to a subscripted
> column name as working the same way that an assignment to a element or
> slice of a zero-dimension array presently does --- that is, you get an
> actual array back and not a NULL. It would also fall out that UPDATE
> of a null array value would behave that way.

That certainly seems nice. Though update of a part of a null array value seems
a little sketchy in theory it would sure be convenient for me.

What I'm curious about is where the original behaviour came from. Is it just
because insert with subscripts was never implemented? Or was there a rationale
for ignoring the subscripts?

--
greg

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jan Wieck 2004-06-09 16:06:57 Re: thread safety tests
Previous Message Jan Wieck 2004-06-09 15:47:43 Re: thread safety tests