pgsql: Disallow UNION/INTERSECT/EXCEPT over no columns.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Disallow UNION/INTERSECT/EXCEPT over no columns.
Дата
Msg-id E1eSQoY-0002KQ-Kt@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Disallow UNION/INTERSECT/EXCEPT over no columns.

Since 9.4, we've allowed the syntax "select union select" and variants
of that.  However, the planner wasn't expecting a no-column set operation
and ended up treating the set operation as if it were UNION ALL.

Pre-v10, there seem to be some executor issues that would need to be
fixed to support such cases, and it doesn't really seem worth expending
much effort on.  Just disallow it, instead.

Per report from Victor Yegorov.

Discussion: https://postgr.es/m/CAGnEbojGJrRSOgJwNGM7JSJZpVAf8xXcVPbVrGdhbVEHZ-BUMw@mail.gmail.com

Branch
------
REL9_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/a84e90bb249d3ece4041f46651b4de566b7f6684

Modified Files
--------------
src/backend/optimizer/prep/prepunion.c | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pgsql: Use new overflow aware integer operations.
Следующее
От: Andres Freund
Дата:
Сообщение: Re: pgsql: Use new overflow aware integer operations.