OSDN Git Service

Add notion of a "transform function" that can simplify function calls.
authorRobert Haas <rhaas@postgresql.org>
Wed, 22 Jun 2011 02:15:24 +0000 (22:15 -0400)
committerRobert Haas <rhaas@postgresql.org>
Wed, 22 Jun 2011 02:21:24 +0000 (22:21 -0400)
commit8f9fe6edce358f7904e0db119416b4d1080a83aa
treea0a828d221e85af6c6bf5bc74a6c6c7190352cbf
parent771a9f69f70e0b4fa95347df7ab346e5bdbc85f2
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
doc/src/sgml/catalogs.sgml
src/backend/catalog/pg_proc.c
src/backend/commands/tablecmds.c
src/backend/optimizer/util/clauses.c
src/backend/parser/parse_clause.c
src/backend/utils/adt/varchar.c
src/include/catalog/catversion.h
src/include/catalog/pg_class.h
src/include/catalog/pg_proc.h
src/include/parser/parse_clause.h
src/include/utils/builtins.h