Skip site navigation (1) Skip section navigation (2)

pgsql: Rename ResolveNew() to ReplaceVarsFromTargetList(),and tweak it

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Rename ResolveNew() to ReplaceVarsFromTargetList(),and tweak it
Date: 2012-11-08 21:53:00
Message-ID: E1TWa20-0005gl-RZ@gemulon.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Rename ResolveNew() to ReplaceVarsFromTargetList(), and tweak its API.

This function currently lacks the option to throw error if the provided
targetlist doesn't have any matching entry for a Var to be replaced.
Two of the four existing call sites would be better off with an error,
as would the usage in the pending auto-updatable-views patch, so it seems
past time to extend the API to support that.  To do so, replace the "event"
parameter (historically of type CmdType, though it was declared plain int)
with a special-purpose enum type.

It's unclear whether this function might be called by third-party code.
Since many C compilers wouldn't warn about a call site continuing to use
the old calling convention, rename the function to forcibly break any
such code that hasn't been updated.  The old name was none too well chosen
anyhow.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/dcc55dd21aa2ba18b28ba9fa441885ef9c99d3c6

Modified Files
--------------
src/backend/optimizer/path/allpaths.c |    8 ++--
src/backend/rewrite/rewriteHandler.c  |   65 +++++++++++++-----------
src/backend/rewrite/rewriteManip.c    |   91 +++++++++++++++++++--------------
src/include/rewrite/rewriteManip.h    |   18 +++++--
4 files changed, 106 insertions(+), 76 deletions(-)

pgsql-committers by date

Next:From: Tom LaneDate: 2012-11-09 01:05:05
Subject: pgsql: Fix WaitLatch() to return promptly when the requested timeoutex
Previous:From: Tom LaneDate: 2012-11-08 16:34:51
Subject: pgsql: Don't trash input list structure in does_not_exist_skipping().

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group