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

Commited6e054

Browse files
committed
Add caution about multiple unique indexes breaking plpgsql upsert example.
Per Phil Sorber, though I didn't use his wording exactly.
1 parent17d3233 commited6e054

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎doc/src/sgml/plpgsql.sgml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2561,7 +2561,10 @@ SELECT merge_db(1, 'dennis');
25612561

25622562
This coding assumes the <literal>unique_violation</> error is caused by
25632563
the <command>INSERT</>, and not by, say, an <command>INSERT</> in a
2564-
trigger function on the table. More safety could be had by using the
2564+
trigger function on the table. It might also misbehave if there is
2565+
more than one unique index on the table, since it will retry the
2566+
operation regardless of which index caused the error.
2567+
More safety could be had by using the
25652568
features discussed next to check that the trapped error was the one
25662569
expected.
25672570
</para>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp