Re: Assignment to array elements - Mailing list pgsql-hackers

From Greg Stark
Subject Re: Assignment to array elements
Date
Msg-id 87smd4viiv.fsf@stark.xeocode.com
Whole thread Raw
In response to Assignment to array elements  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Assignment to array elements
List pgsql-hackers
Tom Lane <tgl@sss.pgh.pa.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



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: pg_dumpall.c missing include time.h?
Next
From: Jan Wieck
Date:
Subject: Re: thread safety tests