mirror of
https://github.com/postgres/postgres.git
synced 2025-10-21 02:52:47 +03:00
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.
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
extern Oid exprType(const Node *expr);
|
||||
extern int32 exprTypmod(const Node *expr);
|
||||
extern bool exprIsLengthCoercion(const Node *expr, int32 *coercedTypmod);
|
||||
extern Node *relabel_to_typmod(Node *expr, int32 typmod);
|
||||
extern bool expression_returns_set(Node *clause);
|
||||
|
||||
extern Oid exprCollation(const Node *expr);
|
||||
|
Reference in New Issue
Block a user