pgsql: Code review for protransform patches. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Code review for protransform patches.
Date
Msg-id E1SBC3v-00053a-HK@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Code review for protransform patches.

Fix loss of previous expression-simplification work when a transform
function fires: we must not simply revert to untransformed input tree.
Instead build a dummy FuncExpr node to pass to the transform function.
This has the additional advantage of providing a simpler, more uniform
API for transform functions.

Move documentation to a somewhat less buried spot, relocate some
poorly-placed code, be more wary of null constants and invalid typmod
values, add an opr_sanity check on protransform function signatures,
and some other minor cosmetic adjustments.

Note: although this patch touches pg_proc.h, no need for catversion
bump, because the changes are cosmetic and don't actually change the
intended catalog contents.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/0339047bc93147c1c6f78f867ae6b0c215406235

Modified Files
--------------
doc/src/sgml/catalogs.sgml               |    3 +-
doc/src/sgml/xfunc.sgml                  |   34 +++++++++
src/backend/nodes/nodeFuncs.c            |   29 +++++++-
src/backend/optimizer/util/clauses.c     |  115 +++++++++++++-----------------
src/backend/parser/parse_clause.c        |   22 ------
src/backend/utils/adt/datetime.c         |   29 ++++----
src/backend/utils/adt/numeric.c          |   23 +++---
src/backend/utils/adt/timestamp.c        |   30 +++-----
src/backend/utils/adt/varbit.c           |   23 +++---
src/backend/utils/adt/varchar.c          |   26 ++++----
src/include/catalog/pg_proc.h            |   23 +++---
src/include/nodes/nodeFuncs.h            |    1 +
src/include/parser/parse_clause.h        |    2 -
src/test/regress/expected/opr_sanity.out |   10 +++
src/test/regress/sql/opr_sanity.sql      |    7 ++
15 files changed, 205 insertions(+), 172 deletions(-)


pgsql-committers by date:

Previous
From: Robert Haas
Date:
Subject: pgsql: Update docs on numeric storage requirements.
Next
From: Tom Lane
Date:
Subject: pgsql: Refactor simplify_function et al to centralize argument simplifi