From: Bruce Momjian Date: Tue, 19 Apr 2005 03:55:43 +0000 (+0000) Subject: >>>>Luckily, PG 8 is available for this. Do you have a short example? X-Git-Tag: REL9_0_0~10383 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=fa66de98a9bb28e0fb561699cf901833b3f41302;p=pg-rex%2Fsyncrep.git >>>>Luckily, PG 8 is available for this. Do you have a short example? >>> >>>No, and I think it should be in the manual as an example. >>> >>>You will need to enter a loop that uses exception handling to detect >>>unique_violation. >> >>Pursuant to an IRC discussion to which Dennis Bjorklund and >>Christopher Kings-Lynne made most of the contributions, please find >>enclosed an example patch demonstrating an UPSERT-like capability. >> David Fetter --- diff --git a/doc/src/sgml/plpgsql.sgml b/doc/src/sgml/plpgsql.sgml index 0d359b1d3b..0fe722cb88 100644 --- a/doc/src/sgml/plpgsql.sgml +++ b/doc/src/sgml/plpgsql.sgml @@ -1,5 +1,5 @@ @@ -2104,6 +2104,7 @@ END; + Exceptions with UPDATE/INSERT This example uses an EXCEPTION to UPDATE or INSERT, as appropriate.