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.
Showing
- doc/src/sgml/syntax.sgml 27 additions, 2 deletionsdoc/src/sgml/syntax.sgml
- src/backend/parser/parse_expr.c 39 additions, 1 deletionsrc/backend/parser/parse_expr.c
- src/backend/parser/parse_target.c 50 additions, 22 deletionssrc/backend/parser/parse_target.c
- src/include/parser/parse_target.h 5 additions, 1 deletionsrc/include/parser/parse_target.h
- src/test/regress/expected/triggers.out 50 additions, 0 deletionssrc/test/regress/expected/triggers.out
- src/test/regress/sql/triggers.sql 48 additions, 0 deletionssrc/test/regress/sql/triggers.sql
Loading
Please register or sign in to comment