aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/xml.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2016-11-08 11:35:01 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2016-11-08 11:35:13 -0500
commit0d4446083df56a36ecec8e8bd321a45ecac7e7c6 (patch)
tree2d5cc49e28497c3d592a9e926ea4c1b1da8f710d /src/backend/utils/adt/xml.c
parentf0e72a25b05d4c29d0102fa0b892782ff193a00e (diff)
downloadpostgresql-0d4446083df56a36ecec8e8bd321a45ecac7e7c6.tar.gz
postgresql-0d4446083df56a36ecec8e8bd321a45ecac7e7c6.zip
Use heap_modify_tuple not SPI_modifytuple in pl/perl triggers.
The code here would need some change anyway given planned change in SPI_modifytuple semantics, since this executes after we've exited the SPI environment. But really it's better to just use heap_modify_tuple. The code's actually shorter this way, and this avoids depending on some rather indirect reasoning about why the temporary arrays can't be overrun. (I think the old code is safe, as long as Perl hashes can't contain duplicate keys; but with this way we don't need that assumption, only the assumption that SPI_fnumber doesn't return an out-of-range attnum.) While at it, normalize use of SPI_fnumber: make error messages distinguish no-such-column from can't-set-system-column, and remove test for deleted column which is going to migrate into SPI_fnumber.
Diffstat (limited to 'src/backend/utils/adt/xml.c')
0 files changed, 0 insertions, 0 deletions