Re: [HACKERS] Assignment to array elements

2004-06-09 Thread Tom Lane
Greg Stark <[EMAIL PROTECTED]> writes: > 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? It's been awhile, but I think that "ignore the subscripts" may have

Re: [HACKERS] Assignment to array elements

2004-06-09 Thread Greg Stark
Tom Lane <[EMAIL PROTECTED]> 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 wou

[HACKERS] Assignment to array elements

2004-06-08 Thread Tom Lane
I'm nearly ready to commit a patch that adds support for INSERT and UPDATE assignments to individual fields of composite columns, along the lines of UPDATE mytab SET complex_col.r = (complex_col).r + 1 WHERE ...; INSERT INTO mytab (complex_col.r, complex_col.i) VALUES(1.1, 2.2); This turned out