Thread: pgsql: Fix more problems with rewriter failing to set Query.hasSubLinks

pgsql: Fix more problems with rewriter failing to set Query.hasSubLinks

From
tgl@postgresql.org (Tom Lane)
Date:
Log Message:
-----------
Fix more problems with rewriter failing to set Query.hasSubLinks when inserting
a SubLink expression into a rule query.  We missed cases where the original
query contained a sub-SELECT in a function in FROM, a multi-row VALUES list,
or a RETURNING list.  Per bug #4434 from Dean Rasheed and subsequent
investigation.

Back-patch to 8.1; older releases don't have the issue because they didn't
try to be smart about setting hasSubLinks only when needed.

Modified Files:
--------------
    pgsql/src/backend/rewrite:
        rewriteHandler.c (r1.179 -> r1.180)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/rewrite/rewriteHandler.c?r1=1.179&r2=1.180)