@@ -621,9 +621,9 @@ INSERT INTO employees_log SELECT *, current_timestamp FROM upd;
621621 expression is used to reference values originally proposed for
622622 insertion:
623623<programlisting>
624- INSERT INTO distributors (did, dname)
625- VALUES (5, 'Gizmo transglobal'), (6, 'Associated Computing, inc')
626- ON CONFLICT (did) DO UPDATE SET dname = EXCLUDED.dname;
624+ INSERT INTO distributors (did, dname)
625+ VALUES (5, 'Gizmo transglobal'), (6, 'Associated Computing, inc')
626+ ON CONFLICT (did) DO UPDATE SET dname = EXCLUDED.dname;
627627</programlisting>
628628 </para>
629629 <para>
@@ -633,8 +633,8 @@ INSERT INTO employees_log SELECT *, current_timestamp FROM upd;
633633 Example assumes a unique index has been defined that constrains
634634 values appearing in the <literal>did</literal> column:
635635<programlisting>
636- INSERT INTO distributors (did, dname) VALUES (7, 'Redline GmbH')
637- ON CONFLICT (did) DO NOTHING;
636+ INSERT INTO distributors (did, dname) VALUES (7, 'Redline GmbH')
637+ ON CONFLICT (did) DO NOTHING;
638638</programlisting>
639639 </para>
640640 <para>
@@ -644,16 +644,16 @@ INSERT INTO employees_log SELECT *, current_timestamp FROM upd;
644644 used to limit the rows actually updated (any existing row not
645645 updated will still be locked, though):
646646<programlisting>
647- -- Don't update existing distributors based in a certain ZIP code
648- INSERT INTO distributors AS d (did, dname) VALUES (8, 'Anvil Distribution')
649- ON CONFLICT (did) DO UPDATE
650- SET dname = EXCLUDED.dname || ' (formerly ' || d.dname || ')'
651- WHERE d.zipcode!= '21201';
652-
653- -- Name a constraint directly in the statement (uses associated
654- -- index to arbitrate taking the DO NOTHING action)
655- INSERT INTO distributors (did, dname) VALUES (9, 'Antwerp Design')
656- ON CONFLICT ON CONSTRAINT distributors_pkey DO NOTHING;
647+ -- Don't update existing distributors based in a certain ZIP code
648+ INSERT INTO distributors AS d (did, dname) VALUES (8, 'Anvil Distribution')
649+ ON CONFLICT (did) DO UPDATE
650+ SET dname = EXCLUDED.dname || ' (formerly ' || d.dname || ')'
651+ WHERE d.zipcode<> '21201';
652+
653+ -- Name a constraint directly in the statement (uses associated
654+ -- index to arbitrate taking the DO NOTHING action)
655+ INSERT INTO distributors (did, dname) VALUES (9, 'Antwerp Design')
656+ ON CONFLICT ON CONSTRAINT distributors_pkey DO NOTHING;
657657</programlisting>
658658 </para>
659659 <para>
@@ -664,11 +664,11 @@ INSERT INTO employees_log SELECT *, current_timestamp FROM upd;
664664 <literal>is_active</literal> boolean column evaluates to
665665 <literal>true</literal>:
666666<programlisting>
667- -- This statement could infer a partial unique index on "did"
668- -- with a predicate of "WHERE is_active", but it could also
669- -- just use a regular unique constraint on "did"
670- INSERT INTO distributors (did, dname) VALUES (10, 'Conrad International')
671- ON CONFLICT (did) WHERE is_active DO NOTHING;
667+ -- This statement could infer a partial unique index on "did"
668+ -- with a predicate of "WHERE is_active", but it could also
669+ -- just use a regular unique constraint on "did"
670+ INSERT INTO distributors (did, dname) VALUES (10, 'Conrad International')
671+ ON CONFLICT (did) WHERE is_active DO NOTHING;
672672</programlisting>
673673 </para>
674674 </refsect1>