Unverified Commit cf667b0c authored by Dimitri Fontaine's avatar Dimitri Fontaine Committed by GitHub
Browse files

Use OVERRIDING SYSTEM VALUE in INSERT statements in follow mode. (#214)

* Use OVERRIDING SYSTEM VALUE in INSERT statements in follow mode.

This allows bypassing GENERATED ALWAYS AS IDENTITY columns when replaying
changes from the source database to the target database. This is an INSERT
statement feature.

See https://www.postgresql.org/docs/current/sql-insert.html for details,
including:

  OVERRIDING SYSTEM VALUE

  If this clause is specified, then any values supplied for identity columns
  will override the default sequence-generated values.

  For an identity column defined as GENERATED ALWAYS, it is an error to
  insert an explicit value (other than DEFAULT) without specifying either
  OVERRIDING SYSTEM VALUE or OVERRIDING USER VALUE. (For an identity column
  defined as GENERATED BY DEFAULT, OVERRIDING SYSTEM VALUE is the normal
  behavior and specifying it does nothing, but PostgreSQL allows it as an
  extension.)

* Fix test files, add comments.
parent b3530d38
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment