]> granicus.if.org Git - postgresql/commit
Install checks in executor startup to ensure that the tuples produced by an
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 8 Aug 2008 17:01:34 +0000 (17:01 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 8 Aug 2008 17:01:34 +0000 (17:01 +0000)
commit7a9b6cd47259e4d5ee4330e6b38fa021dbc111cd
treec952918d0d7c6b1c81ae55b84d37e33b72b6b219
parent5d46ee4a4a59e5febf202ec53a965a4551724504
Install checks in executor startup to ensure that the tuples produced by an
INSERT or UPDATE will match the target table's current rowtype.  In pre-8.3
releases inconsistency can arise with stale cached plans, as reported by
Merlin Moncure.  (We patched the equivalent hazard on the SELECT side in Feb
2007; I'm not sure why we thought there was no risk on the insertion side.)
In 8.3 and HEAD this problem should be impossible due to plan cache
invalidation management, but it seems prudent to make the check anyway.

Back-patch as far as 8.0.  7.x versions lack ALTER COLUMN TYPE, so there
seems no way to abuse a stale plan comparably.
src/backend/executor/execMain.c