From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Fix contrib/postgres_fdw's remote-estimate representation of arr |
Date: | 2014-04-16 21:22:09 |
Message-ID: | E1WaXHV-0005ED-8H@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/5b68d81697bcb0d16136bd037e454ee53c521185
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(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2014-04-16 21:27:12 | pgsql: Fix object identities for text search objects |
Previous Message | Tom Lane | 2014-04-16 19:17:56 | Re: pgsql: Attempt to get plpython regression tests working again for MSVC |