Fix DROP OPERATOR to reset oprcom/oprnegate links to the dropped operator.
commitc94959d4110a1965472956cfd631082a96f64a84
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 25 Mar 2016 16:33:16 +0000 (25 12:33 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 25 Mar 2016 16:33:16 +0000 (25 12:33 -0400)
tree603f7821778785ae423809a2a1d7ed4b0148d68b
parentd543170f2fdd6d9845aaf91dc0f6be7a2bf0d9e7
Fix DROP OPERATOR to reset oprcom/oprnegate links to the dropped operator.

This avoids leaving dangling links in pg_operator; which while fairly
harmless are also unsightly.

While we're at it, simplify OperatorUpd, which went through
heap_modify_tuple for no very good reason considering it had already made
a tuple copy it could just scribble on.

Roma Sokolov, reviewed by Tomas Vondra, additional hacking by Robert Haas
and myself.
src/backend/catalog/pg_operator.c
src/backend/commands/operatorcmds.c
src/include/catalog/pg_operator_fn.h
src/test/regress/expected/drop_operator.out [new file with mode: 0644]
src/test/regress/parallel_schedule
src/test/regress/serial_schedule
src/test/regress/sql/drop_operator.sql [new file with mode: 0644]