From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Fix subtly-wrong volatility checking in BeginCopyFrom(). |
Date: | 2013-11-08 14:00:05 |
Message-ID: | E1VembV-0002Ht-OO@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Fix subtly-wrong volatility checking in BeginCopyFrom().
contain_volatile_functions() is best applied to the output of
expression_planner(), not its input, so that insertion of function
default arguments and constant-folding have been done. (See comments
at CheckMutability, for instance.) It's perhaps unlikely that anyone
will notice a difference in practice, but still we should do it properly.
In passing, change variable type from Node* to Expr* to reduce the net
number of casts needed.
Noted while perusing uses of contain_volatile_functions().
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/060b22a99a67e01aa097f1a21d2123f166ccdb15
Modified Files
--------------
src/backend/commands/copy.c | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Kevin Grittner | 2013-11-08 16:36:55 | Re: pgsql: Fix blatantly broken record_image_cmp() logic for pass-by-value |
Previous Message | Tom Lane | 2013-11-08 00:08:09 | pgsql: Make LOCK_PRINT & PROCLOCK_PRINT expand to ((void) 0) when not i |