• Tom Lane's avatar
    Implement subselects in target lists. Also, relax requirement that · f68e11f3
    Tom Lane authored
    subselects can only appear on the righthand side of a binary operator.
    That's still true for quantified predicates like x = ANY (SELECT ...),
    but a subselect that delivers a single result can now appear anywhere
    in an expression.  This is implemented by changing EXPR_SUBLINK sublinks
    to represent just the (SELECT ...) expression, without any 'left hand
    side' or combining operator --- so they're now more like EXISTS_SUBLINK.
    To handle the case of '(x, y, z) = (SELECT ...)', I added a new sublink
    type MULTIEXPR_SUBLINK, which acts just like EXPR_SUBLINK used to.
    But the grammar will only generate one for a multiple-left-hand-side
    row expression.
    f68e11f3
primnodes.h 16.1 KB