Restructure command-completion-report code so that there is just one

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 56ee2ecba96a742bb6e18dfe8ee48054e90ebaa9
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2002-02-26T22:47:12Z
Releases: 7.3.1
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