Add ALTER OPERATOR command, for changing selectivity estimator functions.
Other options cannot be changed, as it's not totally clear if cached plans
would need to be invalidated if one of the other options change. Selectivity
estimator functions only change plan costs, not correctness of plans, so
those should be safe.
Original patch by Uriy Zhuravlev, heavily edited by me.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/321eed5f0f7563a0cabb3d7a98132856287c1ad1
Modified Files
--------------
doc/src/sgml/ref/alter_operator.sgml | 34 ++-
src/backend/commands/operatorcmds.c | 301 +++++++++++++++++++++-----
src/backend/nodes/copyfuncs.c | 15 ++
src/backend/nodes/equalfuncs.c | 13 ++
src/backend/parser/gram.y | 34 ++-
src/backend/tcop/utility.c | 9 +
src/include/commands/defrem.h | 1 +
src/include/nodes/nodes.h | 1 +
src/include/nodes/parsenodes.h | 13 ++
src/test/regress/expected/alter_operator.out | 76 +++++++
src/test/regress/parallel_schedule | 2 +-
src/test/regress/serial_schedule | 1 +
src/test/regress/sql/alter_operator.sql | 64 ++++++
13 files changed, 499 insertions(+), 65 deletions(-)