dbTalk Databases Forums  

Re: [BUGS] Example in plpgsql docs can lead to infinite loop

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss Re: [BUGS] Example in plpgsql docs can lead to infinite loop in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] Example in plpgsql docs can lead to infinite loop - 01-28-2012 , 08:08 PM






Phil Sorber <phil (AT) omniti (DOT) com> writes:
Quote:
http://www.postgresql.org/docs/devel...UPSERT-EXAMPLE
This example can lead to an infinite loop if there is another column
that has a unique key constraint on it in addition to the primary key
and someone tries to execute the function with a unique primary key
but a duplicate value for the column with the unique constraint.
Hmm. It might work, depending on what the table's various unique
indexes are for, but I agree that a caution about the case is
reasonable. I adjusted your text a bit and committed this.

regards, tom lane

--
Sent via pgsql-bugs mailing list (pgsql-bugs (AT) postgresql (DOT) org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.