pgsql: Fix subtly-wrong volatility checking in BeginCopyFrom().

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Fix subtly-wrong volatility checking in BeginCopyFrom().
Дата
Msg-id E1VembV-0002Hy-Rf@gemulon.postgresql.org
обсуждение исходный текст
Список 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
------
REL9_2_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/733e49ecff050f6520123fba469934426a788cfd

Modified Files
--------------
src/backend/commands/copy.c |   14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Make LOCK_PRINT & PROCLOCK_PRINT expand to ((void) 0) when not i
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix subtly-wrong volatility checking in BeginCopyFrom().