Thread: pgsql: Make ARRAY(SELECT ...) return an empty array, rather than a NULL,

pgsql: Make ARRAY(SELECT ...) return an empty array, rather than a NULL,

From
tgl@postgresql.org (Tom Lane)
Date:
Log Message:
-----------
Make ARRAY(SELECT ...) return an empty array, rather than a NULL, when the
sub-select returns zero rows.  Per complaint from Jens Schicke.  Since this
is more in the nature of a definition change than a bug, not back-patched.

Modified Files:
--------------
    pgsql/src/backend/executor:
        nodeSubplan.c (r1.89 -> r1.90)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/nodeSubplan.c?r1=1.89&r2=1.90)
    pgsql/src/backend/optimizer/plan:
        subselect.c (r1.123 -> r1.124)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/plan/subselect.c?r1=1.123&r2=1.124)
    pgsql/src/include/nodes:
        primnodes.h (r1.132 -> r1.133)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/nodes/primnodes.h?r1=1.132&r2=1.133)