pgsql: Fix dumping of views that are just VALUES(...) but have column a

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Fix dumping of views that are just VALUES(...) but have column a
Дата
Msg-id E1YQfLA-0005N8-Ud@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix dumping of views that are just VALUES(...) but have column aliases.

The "simple" path for printing VALUES clauses doesn't work if we need
to attach nondefault column aliases, because there's noplace to do that
in the minimal VALUES() syntax.  So modify get_simple_values_rte() to
detect nondefault aliases and treat that as a non-simple case.  This
further exposes that the "non-simple" path never actually worked;
it didn't produce valid syntax.  Fix that too.  Per bug #12789 from
Curtis McEnroe, and analysis by Andrew Gierth.

Back-patch to all supported branches.  Before 9.3, this also requires
back-patching the part of commit 092d7ded29f36b0539046b23b81b9f0bf2d637f1
that created get_simple_values_rte() to begin with; inserting the extra
test into the old factorization of that logic would've been too messy.

Branch
------
REL9_3_STABLE

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

Modified Files
--------------
src/backend/utils/adt/ruleutils.c   |   39 +++++++++++++++++++++++---
src/test/regress/expected/rules.out |   53 +++++++++++++++++++++++++++++++++++
src/test/regress/sql/rules.sql      |   16 +++++++++++
3 files changed, 104 insertions(+), 4 deletions(-)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix dumping of views that are just VALUES(...) but have column a
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix dumping of views that are just VALUES(...) but have column a