>>>>Luckily, PG 8 is available for this. Do you have a short example?
authorBruce Momjian
Tue, 19 Apr 2005 03:55:43 +0000 (03:55 +0000)
committerBruce Momjian
Tue, 19 Apr 2005 03:55:43 +0000 (03:55 +0000)
>>>
>>>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

doc/src/sgml/plpgsql.sgml

index 0d359b1d3b3d0364fb0a6950419501e4b96265a5..0fe722cb8871621ff282f7aeee92c957f0d51e78 100644 (file)
@@ -1,5 +1,5 @@
 
 
  
@@ -2104,6 +2104,7 @@ END;
      
     
     
+    Exceptions with UPDATE/INSERT
     
     This example uses an EXCEPTION to UPDATE or
     INSERT, as appropriate.