aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/executor')
-rw-r--r--src/backend/executor/functions.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/backend/executor/functions.c b/src/backend/executor/functions.c
index 9c179707f40..b5af19acf1a 100644
--- a/src/backend/executor/functions.c
+++ b/src/backend/executor/functions.c
@@ -310,6 +310,11 @@ sql_fn_post_column_ref(ParseState *pstate, ColumnRef *cref, Node *var)
* (the first possibility takes precedence)
* A.B.C A = function name, B = record-typed parameter name,
* C = field name
+ * A.* Whole-row reference to composite parameter A.
+ * A.B.* Same, with A = function name, B = parameter name
+ *
+ * Here, it's sufficient to ignore the "*" in the last two cases --- the
+ * main parser will take care of expanding the whole-row reference.
*----------
*/
nnames = list_length(cref->fields);
@@ -317,6 +322,9 @@ sql_fn_post_column_ref(ParseState *pstate, ColumnRef *cref, Node *var)
if (nnames > 3)
return NULL;
+ if (IsA(llast(cref->fields), A_Star))
+ nnames--;
+
field1 = (Node *) linitial(cref->fields);
Assert(IsA(field1, String));
name1 = strVal(field1);