pgsql: Fix DROP OPERATOR to reset oprcom/oprnegate links to the dropped

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix DROP OPERATOR to reset oprcom/oprnegate links to the dropped
Date: 2016-03-25 16:33:27
Message-ID: E1ajUfv-0006AW-CC@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/c94959d4110a1965472956cfd631082a96f64a84

Modified Files
--------------
src/backend/catalog/pg_operator.c | 196 ++++++++++++++--------------
src/backend/commands/operatorcmds.c | 20 +++
src/include/catalog/pg_operator_fn.h | 2 +
src/test/regress/expected/drop_operator.out | 61 +++++++++
src/test/regress/parallel_schedule | 2 +-
src/test/regress/serial_schedule | 3 +-
src/test/regress/sql/drop_operator.sql | 56 ++++++++
7 files changed, 239 insertions(+), 101 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2016-03-25 16:47:02 Re: [COMMITTERS] pgsql: Move each SLRU's lwlocks to a separate tranche.
Previous Message Tom Lane 2016-03-25 15:19:58 pgsql: Don't split up SRFs when choosing to postpone SELECT output expr