pgsql: Mark operator implementation functions as such in their comments - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Mark operator implementation functions as such in their comments
Date
Msg-id E1Pv27R-0005ES-AG@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Mark operator implementation functions as such in their comments.

Historically, we've not had separate comments for built-in pg_operator
entries, but relied on the comments for the underlying functions.  The
trouble with this approach is that there isn't much of anything to suggest
to users that they'd be better off using the operators instead.  So, move
all the relevant comments into pg_operator, and give each underlying
function a comment that just says "implementation of XXX operator".
There are only about half a dozen cases where it seems reasonable to use
the underlying function interchangeably with the operator; in these cases
I left the same comment in place on the function as on the operator.

While at it, establish a policy that every built-in function and operator
entry should have a comment: there are now queries in the opr_sanity
regression test that will complain if one doesn't.  This only required
adding a dozen or two more entries than would have been there anyway.

I also spent some time trying to eliminate gratuitous inconsistencies in
the style of the comments, though it's hopeless to suppose that more won't
creep in soon enough.

Per my proposal of 2010-10-15.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/94133a935414407920a47d06a6e22734c974c3b8

Modified Files
--------------
src/bin/psql/describe.c                  |   21 +-
src/include/catalog/catversion.h         |    2 +-
src/include/catalog/pg_operator.h        |  709 +++++++++++++-
src/include/catalog/pg_proc.h            | 1694 +++++++++++++++---------------
src/test/regress/expected/opr_sanity.out |   51 +
src/test/regress/sql/opr_sanity.sql      |   37 +
6 files changed, 1676 insertions(+), 838 deletions(-)


pgsql-committers by date:

Previous
From: itagaki@pgfoundry.org (User Itagaki)
Date:
Subject: reorg - pg_reorg: work around for 9.1.
Next
From: Tom Lane
Date:
Subject: pgsql: Add -lm to SHLIB_LINK for contrib/btree_gist.