Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite8898e9

Browse files
committed
Minor ON CONFLICT related comments and doc fixes.
Geoff Winkless, Stephen Frost, Peter Geoghegan and me.
1 parent53bb309 commite8898e9

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

‎doc/src/sgml/ref/insert.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ INSERT INTO <replaceable class="PARAMETER">table_name</replaceable> [ AS <replac
7676
<para>
7777
<literal>ON CONFLICT</> can be used to specify an alternative
7878
action to raising a unique constraint or exclusion constraint
79-
violation error. (See <xref linkend="sql-on-conflict"
79+
violation error. (See <xref linkend="sql-on-conflict"
8080
endterm="sql-on-conflict-title"> below.)
8181
</para>
8282

@@ -397,7 +397,7 @@ INSERT INTO <replaceable class="PARAMETER">table_name</replaceable> [ AS <replac
397397
<emphasis>unique index inference</emphasis> clause or an explicitly
398398
named constraint can be used. For <literal>ON CONFLICT DO
399399
NOTHING</literal>, it is optional to specify a
400-
<parameter>conflict_target</parameter>; whenommitted, conflicts
400+
<parameter>conflict_target</parameter>; whenomitted, conflicts
401401
with all usable constraints (and unique indexes) are handled. For
402402
<literal>ON CONFLICT DO UPDATE</literal>, a conflict target
403403
<emphasis>must</emphasis> be specified.

‎src/backend/access/heap/heapam.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2068,10 +2068,10 @@ FreeBulkInsertState(BulkInsertState bistate)
20682068
* Speculatively inserted tuples behave as "value locks" of short duration,
20692069
* used to implement INSERT .. ON CONFLICT.
20702070
*
2071-
* Note that these options will be applied when inserting into the heap's
2072-
* TOAST table, too, if the tuple requires any out-of-line data.
2073-
*FIXME: Do we mark TOAST tuplesasspeculative too? What about confirming
2074-
*or aborting them?
2071+
* Note thatmost ofthese options will be applied when inserting into the
2072+
*heap'sTOAST table, too, if the tuple requires any out-of-line data. Only
2073+
*HEAP_INSERT_IS_SPECULATIVE is explicitly ignored,asthe toast data does
2074+
*not partake in speculative insertion.
20752075
*
20762076
* The BulkInsertState object (if any; bistate can be NULL for default
20772077
* behavior) is also just passed through to RelationGetBufferForTuple.

‎src/backend/commands/trigger.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@ intSessionReplicationRole = SESSION_REPLICATION_ROLE_ORIGIN;
6666
staticintMyTriggerDepth=0;
6767

6868
/*
69-
* Note that similar macros alsoexists in executor/execMain.c. There does not
70-
* appear to be any good header to putit into, given the structures that it
71-
*uses, so we let them be duplicated. Be sure to updateboth if one needs to
72-
* be changed, however.
69+
* Note that similar macros alsoexist in executor/execMain.c. There does not
70+
* appear to be any good header to putthem into, given the structures that
71+
*they use, so we let them be duplicated. Be sure to updateall if one needs
72+
*tobe changed, however.
7373
*/
7474
#defineGetUpdatedColumns(relinfo,estate) \
7575
(rt_fetch((relinfo)->ri_RangeTableIndex, (estate)->es_range_table)->updatedCols)

‎src/include/nodes/execnodes.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1108,7 +1108,7 @@ typedef struct ModifyTableState
11081108
List*mt_arbiterindexes;/* unique index OIDs to arbitrate taking alt path */
11091109
TupleTableSlot*mt_existing;/* slot to store existing target tuple in */
11101110
List*mt_excludedtlist;/* the excluded pseudo relation's tlist */
1111-
TupleTableSlot*mt_conflproj;/* FIXME*/
1111+
TupleTableSlot*mt_conflproj;/*CONFLICT ... SET ... projection target*/
11121112
}ModifyTableState;
11131113

11141114
/* ----------------

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp