pgsql: Fix handling of strict non-set functions with NULLs in set-value

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Fix handling of strict non-set functions with NULLs in set-value
Дата
Msg-id E1UbZl2-0004kY-F8@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix handling of strict non-set functions with NULLs in set-valued inputs.

In a construct like "select plain_function(set_returning_function(...))",
the plain function is applied to each output row of the SRF successively.
If some of the SRF outputs are NULL, and the plain function is strict,
you'd expect to get NULL results for such rows ... but what actually
happened was that such rows were omitted entirely from the result set.
This was due to confusion of this case with what should happen for nested
set-returning functions; a strict SRF is indeed supposed to yield an empty
set for null input.  Per bug #8150 from Erwin Brandstetter.

Although this has been broken forever, we're not back-patching because
of the possibility that some apps out there expect the incorrect behavior.
This change should be listed as a possible incompatibility in the 9.3
release notes.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/904af8db8a99409257db1eed0b056c8098e9013c

Modified Files
--------------
src/backend/executor/execQual.c      |   10 +++++++++-
src/test/regress/expected/arrays.out |    9 +++++++++
src/test/regress/sql/arrays.sql      |    1 +
3 files changed, 19 insertions(+), 1 deletions(-)


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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: pgsql: pgbench: Fix order of options in --help output
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix handling of OID wraparound while in standalone mode.