Fix DROP OPERATOR to reset oprcom/oprnegate links to the dropped operator.
Tom Lane <tgl@sss.pgh.pa.us>
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.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/catalog/pg_operator.c | modified | +97 −99 |
| src/backend/commands/operatorcmds.c | modified | +20 −0 |
| src/include/catalog/pg_operator_fn.h | modified | +2 −0 |
| src/test/regress/expected/drop_operator.out | added | +61 −0 |
| src/test/regress/parallel_schedule | modified | +1 −1 |
| src/test/regress/serial_schedule | modified | +2 −1 |
| src/test/regress/sql/drop_operator.sql | added | +56 −0 |