From 8f9fe6edce358f7904e0db119416b4d1080a83aa Mon Sep 17 00:00:00 2001 From: Robert Haas Date: Tue, 21 Jun 2011 22:15:24 -0400 Subject: Add notion of a "transform function" that can simplify function calls. Initially, we use this only to eliminate calls to the varchar() function in cases where the length is not being reduced and, therefore, the function call is equivalent to a RelabelType operation. The most significant effect of this is that we can avoid a table rewrite when changing a varchar(X) column to a varchar(Y) column, where Y > X. Noah Misch, reviewed by me and Alexey Klyukin --- src/include/parser/parse_clause.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/include/parser/parse_clause.h') diff --git a/src/include/parser/parse_clause.h b/src/include/parser/parse_clause.h index 09ef450ac5..f5ce2ff288 100644 --- a/src/include/parser/parse_clause.h +++ b/src/include/parser/parse_clause.h @@ -44,4 +44,6 @@ 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 */ -- cgit v1.2.1