>>>
>>>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
</para>
</tip>
<example id="plpgsql-upsert-example">
+ <title>Exceptions with UPDATE/INSERT</title>
<para>
This example uses an <literal>EXCEPTION</> to <command>UPDATE</> or
<command>INSERT</>, as appropriate.