pgsql: Add notion of a "transform function" that can simplify function

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Add notion of a "transform function" that can simplify function
Date: 2011-06-22 02:21:43
Message-ID: E1QZD4Z-0000JS-FN@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

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

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/8f9fe6edce358f7904e0db119416b4d1080a83aa

Modified Files
--------------
doc/src/sgml/catalogs.sgml | 7 +
src/backend/catalog/pg_proc.c | 1 +
src/backend/commands/tablecmds.c | 9 +-
src/backend/optimizer/util/clauses.c | 87 +-
src/backend/parser/parse_clause.c | 22 +
src/backend/utils/adt/varchar.c | 34 +
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_class.h | 2 +-
src/include/catalog/pg_proc.h | 4568 +++++++++++++++++-----------------
src/include/parser/parse_clause.h | 2 +
src/include/utils/builtins.h | 1 +
11 files changed, 2428 insertions(+), 2307 deletions(-)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2011-06-22 02:37:16 pgsql: Make deadlock_timeout PGC_SUSET rather than PGC_SIGHUP.
Previous Message Robert Haas 2011-06-22 01:55:31 pgsql: Performance tuning advice for SSI.

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-06-22 02:22:46 Re: Identifying no-op length coercions
Previous Message Bruce Momjian 2011-06-22 02:18:49 Re: WIP pgindent replacement