diff options
author | Bruce Momjian <bruce@momjian.us> | 2005-04-19 03:55:43 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2005-04-19 03:55:43 +0000 |
commit | fa66de98a9bb28e0fb561699cf901833b3f41302 (patch) | |
tree | 4f32079dceed281560ce024d8783da7de5f3c9cf | |
parent | bd32a2559873030020c7b4324ba2fbb4026d43d5 (diff) | |
download | postgresql-fa66de98a9bb28e0fb561699cf901833b3f41302.tar.gz postgresql-fa66de98a9bb28e0fb561699cf901833b3f41302.zip |
>>>>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
-rw-r--r-- | doc/src/sgml/plpgsql.sgml | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/doc/src/sgml/plpgsql.sgml b/doc/src/sgml/plpgsql.sgml index 0d359b1d3b3..0fe722cb887 100644 --- a/doc/src/sgml/plpgsql.sgml +++ b/doc/src/sgml/plpgsql.sgml @@ -1,5 +1,5 @@ <!-- -$PostgreSQL: pgsql/doc/src/sgml/plpgsql.sgml,v 1.66 2005/04/19 03:37:20 momjian Exp $ +$PostgreSQL: pgsql/doc/src/sgml/plpgsql.sgml,v 1.67 2005/04/19 03:55:43 momjian Exp $ --> <chapter id="plpgsql"> @@ -2104,6 +2104,7 @@ END; </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. |