diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2007-08-26 21:44:25 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2007-08-26 21:44:25 +0000 |
commit | 67bf7b919eddf9bd9ddc9e2d8f2dc7ca3bbfd3a2 (patch) | |
tree | 84a7cb30a4c4bb3c0058108a1256545f5dc8fe2e /src/backend/optimizer/plan/subselect.c | |
parent | 75d5f6fe791439fa925cd3a3b06c97ce2ddd705f (diff) |
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.
Diffstat (limited to 'src/backend/optimizer/plan/subselect.c')
-rw-r--r-- | src/backend/optimizer/plan/subselect.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/backend/optimizer/plan/subselect.c b/src/backend/optimizer/plan/subselect.c index 6a41138d3b2..8b739e16d44 100644 --- a/src/backend/optimizer/plan/subselect.c +++ b/src/backend/optimizer/plan/subselect.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/optimizer/plan/subselect.c,v 1.123 2007/07/18 21:40:57 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/optimizer/plan/subselect.c,v 1.124 2007/08/26 21:44:25 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -208,10 +208,10 @@ generate_new_param(PlannerInfo *root, Oid paramtype, int32 paramtypmod) /* * Get the datatype of the first column of the plan's output. * - * This is a hack to support exprType(), which doesn't have any way to get - * at the plan associated with a SubPlan node. We really only need the value - * for EXPR_SUBLINK and ARRAY_SUBLINK subplans, but for consistency we set - * it always. + * This is stored for ARRAY_SUBLINK and for exprType(), which doesn't have any + * way to get at the plan associated with a SubPlan node. We really only need + * the value for EXPR_SUBLINK and ARRAY_SUBLINK subplans, but for consistency + * we set it always. */ static Oid get_first_col_type(Plan *plan) |