From 2f63232d30ca64a8f2684af855230f23a701d371 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Mon, 10 May 2004 22:44:49 +0000 Subject: Promote row expressions to full-fledged citizens of the expression syntax, rather than allowing them only in a few special cases as before. In particular you can now pass a ROW() construct to a function that accepts a rowtype parameter. Internal generation of RowExprs fixes a number of corner cases that used to not work very well, such as referencing the whole-row result of a JOIN or subquery. This represents a further step in the work I started a month or so back to make rowtype values into first-class citizens. --- src/backend/parser/parse_target.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/backend/parser/parse_target.c') diff --git a/src/backend/parser/parse_target.c b/src/backend/parser/parse_target.c index c9c44ac2389..fbee22b37d3 100644 --- a/src/backend/parser/parse_target.c +++ b/src/backend/parser/parse_target.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/parser/parse_target.c,v 1.116 2004/04/02 19:06:58 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/parser/parse_target.c,v 1.117 2004/05/10 22:44:46 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -643,6 +643,10 @@ FigureColnameInternal(Node *node, char **name) /* make ARRAY[] act like a function */ *name = "array"; return 2; + case T_RowExpr: + /* make ROW() act like a function */ + *name = "row"; + return 2; case T_CoalesceExpr: /* make coalesce() act like a regular function */ *name = "coalesce"; -- cgit v1.2.3