diff options
| author | Tom Lane | 2006-06-26 17:24:41 +0000 |
|---|---|---|
| committer | Tom Lane | 2006-06-26 17:24:41 +0000 |
| commit | ca0d2197ca1ed1e72243c5a3466d93e4954d30b0 (patch) | |
| tree | 504e97d13b6403683d46c8285dfeb66dcc0ed305 /src/include/parser | |
| parent | 4b98d423d77682308423ed3c4470b741f08f7b23 (diff) | |
Change the row constructor syntax (ROW(...)) so that list elements foo.*
will be expanded to a list of their member fields, rather than creating
a nested rowtype field as formerly. (The old behavior is still available
by omitting '.*'.) This syntax is not allowed by the SQL spec AFAICS,
so changing its behavior doesn't violate the spec. The new behavior is
substantially more useful since it allows, for example, triggers to check
for data changes with 'if row(new.*) is distinct from row(old.*)'. Per
my recent proposal.
Diffstat (limited to 'src/include/parser')
| -rw-r--r-- | src/include/parser/parse_target.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/include/parser/parse_target.h b/src/include/parser/parse_target.h index f1cb2bd8a1c..6080696baa0 100644 --- a/src/include/parser/parse_target.h +++ b/src/include/parser/parse_target.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/parser/parse_target.h,v 1.39 2006/03/23 00:19:30 tgl Exp $ + * $PostgreSQL: pgsql/src/include/parser/parse_target.h,v 1.40 2006/06/26 17:24:41 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -22,6 +22,10 @@ extern void markTargetListOrigins(ParseState *pstate, List *targetlist); extern TargetEntry *transformTargetEntry(ParseState *pstate, Node *node, Node *expr, char *colname, bool resjunk); +extern List *ExpandColumnRefStar(ParseState *pstate, ColumnRef *cref, + bool targetlist); +extern List *ExpandIndirectionStar(ParseState *pstate, A_Indirection *ind, + bool targetlist); extern void updateTargetListEntry(ParseState *pstate, TargetEntry *tle, char *colname, int attrno, List *indirection, |
