pgsql: Mark operator implementation functions as such in their comments

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Mark operator implementation functions as such in their comments
Date: 2011-03-03 06:34:37
Message-ID: E1Pv27R-0005ES-AG@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2011-03-03 06:43:59 pgsql: Add -lm to SHLIB_LINK for contrib/btree_gist.
Previous Message User Itagaki 2011-03-03 01:21:41 reorg - pg_reorg: work around for 9.1.