Thread: Confusing bit in the "EXAMPLES" section for INSERT
Insert a distributor, or do nothing for rows proposed for insertion when an existing, excluded row (a row with a matching constrained column or columns after before row insert triggers fire) exists. Example assumes a unique index has been defined that constrains values appearing in thedid
column:
Suggesting this as replacement:
Insert a distributor, or do nothing if the proposed row conflicts with an existing row. Per-row triggers
BEFORE INSERT
are fired, and possible effects on the proposed applied, before checking for conflicts. Example assumes a unique index on the did
column exists:Regards
Erwin
Added a missing word:
Insert a distributor, or do nothing if the proposed row conflicts with an existing row. Per-row triggers
BEFORE INSERT
are fired, and possible effects on the proposed row applied, before checking for conflicts. Example assumes a unique index on the did
column exists:Regards
Erwin
On Tue, 16 Aug 2022 at 23:09, Erwin Brandstetter <brsaweda@gmail.com> wrote:
Insert a distributor, or do nothing for rows proposed for insertion when an existing, excluded row (a row with a matching constrained column or columns after before row insert triggers fire) exists. Example assumes a unique index has been defined that constrains values appearing in thedid
column:Suggesting this as replacement:Insert a distributor, or do nothing if the proposed row conflicts with an existing row. Per-row triggersBEFORE INSERT
are fired, and possible effects on the proposed applied, before checking for conflicts. Example assumes a unique index on thedid
column exists:RegardsErwin
Seeing that an earlier, related passage in the text reads:
> Note that the effects of all per-row
BEFORE INSERT
triggers are reflected in excluded
values, ...I update my suggestion to use the same expression:
Insert a distributor, or do nothing if the proposed row conflicts with an existing row. Per-row
BEFORE INSERT
triggers are fired, and possible effects on the proposed row applied, before checking for conflicts. Example assumes a unique index on the did
column exists:Regards
Erwin
On Tue, 16 Aug 2022 at 23:09, Erwin Brandstetter <brsaweda@gmail.com> wrote:
Insert a distributor, or do nothing for rows proposed for insertion when an existing, excluded row (a row with a matching constrained column or columns after before row insert triggers fire) exists. Example assumes a unique index has been defined that constrains values appearing in thedid
column:Suggesting this as replacement:Insert a distributor, or do nothing if the proposed row conflicts with an existing row. Per-row triggersBEFORE INSERT
are fired, and possible effects on the proposed applied, before checking for conflicts. Example assumes a unique index on thedid
column exists:RegardsErwin