Minor ON CONFLICT related comments and doc fixes.
Geoff Winkless, Stephen Frost, Peter Geoghegan and me.
This commit is contained in:
parent
53bb309d2d
commit
e8898e9169
|
@ -76,7 +76,7 @@ INSERT INTO <replaceable class="PARAMETER">table_name</replaceable> [ AS <replac
|
||||||
<para>
|
<para>
|
||||||
<literal>ON CONFLICT</> can be used to specify an alternative
|
<literal>ON CONFLICT</> can be used to specify an alternative
|
||||||
action to raising a unique constraint or exclusion constraint
|
action to raising a unique constraint or exclusion constraint
|
||||||
violation error . (See <xref linkend="sql-on-conflict"
|
violation error. (See <xref linkend="sql-on-conflict"
|
||||||
endterm="sql-on-conflict-title"> below.)
|
endterm="sql-on-conflict-title"> below.)
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
@ -397,7 +397,7 @@ INSERT INTO <replaceable class="PARAMETER">table_name</replaceable> [ AS <replac
|
||||||
<emphasis>unique index inference</emphasis> clause or an explicitly
|
<emphasis>unique index inference</emphasis> clause or an explicitly
|
||||||
named constraint can be used. For <literal>ON CONFLICT DO
|
named constraint can be used. For <literal>ON CONFLICT DO
|
||||||
NOTHING</literal>, it is optional to specify a
|
NOTHING</literal>, it is optional to specify a
|
||||||
<parameter>conflict_target</parameter>; when ommitted, conflicts
|
<parameter>conflict_target</parameter>; when omitted, conflicts
|
||||||
with all usable constraints (and unique indexes) are handled. For
|
with all usable constraints (and unique indexes) are handled. For
|
||||||
<literal>ON CONFLICT DO UPDATE</literal>, a conflict target
|
<literal>ON CONFLICT DO UPDATE</literal>, a conflict target
|
||||||
<emphasis>must</emphasis> be specified.
|
<emphasis>must</emphasis> be specified.
|
||||||
|
|
|
@ -2068,10 +2068,10 @@ FreeBulkInsertState(BulkInsertState bistate)
|
||||||
* Speculatively inserted tuples behave as "value locks" of short duration,
|
* Speculatively inserted tuples behave as "value locks" of short duration,
|
||||||
* used to implement INSERT .. ON CONFLICT.
|
* used to implement INSERT .. ON CONFLICT.
|
||||||
*
|
*
|
||||||
* Note that these options will be applied when inserting into the heap's
|
* Note that most of these options will be applied when inserting into the
|
||||||
* TOAST table, too, if the tuple requires any out-of-line data.
|
* heap's TOAST table, too, if the tuple requires any out-of-line data. Only
|
||||||
* FIXME: Do we mark TOAST tuples as speculative too? What about confirming
|
* HEAP_INSERT_IS_SPECULATIVE is explicitly ignored, as the toast data does
|
||||||
* or aborting them?
|
* not partake in speculative insertion.
|
||||||
*
|
*
|
||||||
* The BulkInsertState object (if any; bistate can be NULL for default
|
* The BulkInsertState object (if any; bistate can be NULL for default
|
||||||
* behavior) is also just passed through to RelationGetBufferForTuple.
|
* behavior) is also just passed through to RelationGetBufferForTuple.
|
||||||
|
|
|
@ -66,10 +66,10 @@ int SessionReplicationRole = SESSION_REPLICATION_ROLE_ORIGIN;
|
||||||
static int MyTriggerDepth = 0;
|
static int MyTriggerDepth = 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Note that similar macros also exists in executor/execMain.c. There does not
|
* Note that similar macros also exist in executor/execMain.c. There does not
|
||||||
* appear to be any good header to put it into, given the structures that it
|
* appear to be any good header to put them into, given the structures that
|
||||||
* uses, so we let them be duplicated. Be sure to update both if one needs to
|
* they use, so we let them be duplicated. Be sure to update all if one needs
|
||||||
* be changed, however.
|
* to be changed, however.
|
||||||
*/
|
*/
|
||||||
#define GetUpdatedColumns(relinfo, estate) \
|
#define GetUpdatedColumns(relinfo, estate) \
|
||||||
(rt_fetch((relinfo)->ri_RangeTableIndex, (estate)->es_range_table)->updatedCols)
|
(rt_fetch((relinfo)->ri_RangeTableIndex, (estate)->es_range_table)->updatedCols)
|
||||||
|
|
|
@ -1108,7 +1108,7 @@ typedef struct ModifyTableState
|
||||||
List *mt_arbiterindexes; /* unique index OIDs to arbitrate taking alt path */
|
List *mt_arbiterindexes; /* unique index OIDs to arbitrate taking alt path */
|
||||||
TupleTableSlot *mt_existing; /* slot to store existing target tuple in */
|
TupleTableSlot *mt_existing; /* slot to store existing target tuple in */
|
||||||
List *mt_excludedtlist; /* the excluded pseudo relation's tlist */
|
List *mt_excludedtlist; /* the excluded pseudo relation's tlist */
|
||||||
TupleTableSlot *mt_conflproj; /* FIXME*/
|
TupleTableSlot *mt_conflproj; /* CONFLICT ... SET ... projection target */
|
||||||
} ModifyTableState;
|
} ModifyTableState;
|
||||||
|
|
||||||
/* ----------------
|
/* ----------------
|
||||||
|
|
Loading…
Reference in New Issue