Restructure command-completion-report code so that there is just one
Tom Lane <tgl@sss.pgh.pa.us>
Restructure command-completion-report code so that there is just one report for each received SQL command, regardless of rewriting activity. Also ensure that this report comes from the 'original' command, not the last command generated by rewrite; this fixes 7.2 breakage for INSERT commands that have actions added by rules. Fernando Nasser and Tom Lane.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/commands/command.c | modified | +30 −24 |
| src/backend/commands/explain.c | modified | +2 −2 |
| src/backend/executor/functions.c | modified | +2 −2 |
| src/backend/executor/spi.c | modified | +3 −3 |
| src/backend/nodes/copyfuncs.c | modified | +2 −1 |
| src/backend/nodes/equalfuncs.c | modified | +2 −1 |
| src/backend/nodes/readfuncs.c | modified | +4 −1 |
| src/backend/parser/analyze.c | modified | +17 −4 |
| src/backend/tcop/dest.c | modified | +6 −37 |
| src/backend/tcop/postgres.c | modified | +346 −19 |
| src/backend/tcop/pquery.c | modified | +51 −59 |
| src/backend/tcop/utility.c | modified | +21 −109 |
| src/include/commands/command.h | modified | +2 −2 |
| src/include/nodes/parsenodes.h | modified | +3 −1 |
| src/include/tcop/dest.h | modified | +7 −3 |
| src/include/tcop/pquery.h | modified | +3 −2 |
| src/include/tcop/utility.h | modified | +3 −2 |