postgres_fdw: Fix incorrect NULL handling in join pushdown.
authorRobert Haas <rhaas@postgresql.org>
Fri, 24 Jun 2016 19:06:19 +0000 (15:06 -0400)
committerRobert Haas <rhaas@postgresql.org>
Fri, 24 Jun 2016 19:14:15 +0000 (15:14 -0400)
commit9e9c38e15947f4f3ed478f8b70e74b55e31fe950
treed9f54f2467dc92d7d029baed1487a0cbfebb4d73
parent267569b24c1782b756cad46ffc8e9b28988e7385
postgres_fdw: Fix incorrect NULL handling in join pushdown.

something.* IS NOT NULL means that every attribute of the row is not
NULL, not that the row itself is non-NULL (e.g. because it's coming
from below an outer join.  Use (somevar.*)::pg_catalog.text IS NOT
NULL instead.

Ashutosh Bapat, per a report by Rushabh Lathia.  Reviewed by
Amit Langote and Etsuro Fujita.  Schema-qualification added by me.
contrib/postgres_fdw/deparse.c
contrib/postgres_fdw/expected/postgres_fdw.out
contrib/postgres_fdw/sql/postgres_fdw.sql