git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 17d3233)
Add caution about multiple unique indexes breaking plpgsql upsert example.
2012年1月29日 02:06:41 +0000 (21:06 -0500)
2012年1月29日 02:06:41 +0000 (21:06 -0500)
Per Phil Sorber, though I didn't use his wording exactly.


diff --git a/doc/src/sgml/plpgsql.sgml b/doc/src/sgml/plpgsql.sgml
index 5a1e33fb4be88d1e28daf5ffc8fa82ba837959d3..c5e9c2ee2d18b341942a00a04b40030b8acd62f0 100644 (file)
--- a/doc/src/sgml/plpgsql.sgml
+++ b/doc/src/sgml/plpgsql.sgml
@@ -2561,7 +2561,10 @@ SELECT merge_db(1, 'dennis');
This coding assumes the <literal>unique_violation</> error is caused by
the <command>INSERT</>, and not by, say, an <command>INSERT</> in a
- trigger function on the table. More safety could be had by using the
+ trigger function on the table. It might also misbehave if there is
+ more than one unique index on the table, since it will retry the
+ operation regardless of which index caused the error.
+ More safety could be had by using the
features discussed next to check that the trapped error was the one
expected.
</para>
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /