Fix INSERT OVERRIDING USER VALUE behavior

The original implementation disallowed using OVERRIDING USER VALUE on
identity columns defined as GENERATED ALWAYS, which is not per
standard.  So allow that now.

Expand documentation and tests around this.

Author: Dean Rasheed <[email protected]>
Reviewed-by: Peter Eisentraut <[email protected]>
Reviewed-by: Vik Fearing <[email protected]>
Discussion: 
https://www.postgresql.org/message-id/flat/CAEZATCVrh2ufCwmzzM%3Dk_OfuLhTTPBJCdFkimst2kry4oHepuQ%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/de3bbfcc962f24c1a20a17b76c604e5973a05817

Modified Files
--------------
doc/src/sgml/ref/create_table.sgml     | 30 +++++++++++++++++--------
doc/src/sgml/ref/insert.sgml           | 31 +++++++++++++++++--------
doc/src/sgml/ref/update.sgml           |  7 ++++--
src/backend/rewrite/rewriteHandler.c   |  4 +++-
src/test/regress/expected/identity.out | 41 +++++++++++++++++++++++++---------
src/test/regress/sql/identity.sql      | 25 +++++++++++++++++----
6 files changed, 102 insertions(+), 36 deletions(-)

Reply via email to