pgsql: Fix contrib/postgres_fdw's remote-estimate representation of arr

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Fix contrib/postgres_fdw's remote-estimate representation of arr
Дата
Msg-id E1WaXHV-0005EF-9J@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix contrib/postgres_fdw's remote-estimate representation of array Params.

We were emitting "(SELECT null::typename)", which is usually interpreted
as a scalar subselect, but not so much in the context "x = ANY(...)".
This led to remote-side parsing failures when remote_estimate is enabled.
A quick and ugly fix is to stick in an extra cast step,
"((SELECT null::typename)::typename)".  The cast will be thrown away as
redundant by parse analysis, but not before it's done its job of making
sure the grammar sees the ANY argument as an a_expr rather than a
select_with_parens.  Per an example from Hannu Krosing.

Branch
------
REL9_3_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/9612b982b8c9a8fd2c07e3c03e6a1878e4e41d9b

Modified Files
--------------
contrib/postgres_fdw/deparse.c                 |   84 +++++++++++++++---------
contrib/postgres_fdw/expected/postgres_fdw.out |   19 ++++++
contrib/postgres_fdw/sql/postgres_fdw.sql      |    3 +
3 files changed, 76 insertions(+), 30 deletions(-)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix contrib/postgres_fdw's remote-estimate representation of arr
Следующее
От: Alvaro Herrera
Дата:
Сообщение: pgsql: Fix object identities for text search objects