OSDN Git Service

Make update lists like 'UPDATE tab SET foo[1] = bar, foo[3] = baz'
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 22 Jul 2000 06:19:04 +0000 (06:19 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 22 Jul 2000 06:19:04 +0000 (06:19 +0000)
commita5a12887a15449ec5a19915c21611ae5006c5361
tree655febf830619ba0199fe2780025077401aee748
parent2019e24dd8093a36331a4fe02c1ac8943bdc0c23
Make update lists like 'UPDATE tab SET foo[1] = bar, foo[3] = baz'
work as expected.  THe underlying implementation is essentially
'SET foo = array_set(foo, 1, bar)', so we have to turn the items
into nested invocations of array_set() to make it work correctly.
Side effect: we now complain about 'UPDATE tab SET foo = bar, foo = baz'
which is illegal per SQL92 but we didn't detect it before.
src/backend/optimizer/prep/preptlist.c