mirror of
https://github.com/postgres/postgres.git
synced 2025-08-24 09:27:52 +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:
@@ -44,6 +44,4 @@ extern List *transformDistinctOnClause(ParseState *pstate, List *distinctlist,
|
||||
extern Index assignSortGroupRef(TargetEntry *tle, List *tlist);
|
||||
extern bool targetIsInSortList(TargetEntry *tle, Oid sortop, List *sortList);
|
||||
|
||||
extern Node *relabel_to_typmod(Node *expr, int32 typmod);
|
||||
|
||||
#endif /* PARSE_CLAUSE_H */
|
||||
|
Reference in New Issue
Block a user