remove upsert example from docs - Mailing list pgsql-hackers

From Merlin Moncure
Subject remove upsert example from docs
Date
Msg-id AANLkTikFTBBjy=L_ipCRc8fBubTwwugcfWQKpLOnX9Zp@mail.gmail.com
Whole thread Raw
Responses Re: remove upsert example from docs  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Re: remove upsert example from docs  ("Greg Sabino Mullane" <greg@turnstep.com>)
Re: remove upsert example from docs  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Attached is a patch to remove the upsert example from the pl/pgsql
documentation.  It has a serious bug (see:
http://www.spinics.net/lists/pgsql/msg112560.html) which is nontrivial
to fix.  IMNSHO, our code examples should encourage good practices and
style.

The 'correct' way to do race free upsert is to take a table lock first
-- you don't have to loop or open a subtransaction.  A high
concurrency version is nice but is more of a special case solution (it
looks like concurrent MERGE might render the issue moot anyways).

merlin

Attachment

pgsql-hackers by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: Concurrent MERGE
Next
From: "Kevin Grittner"
Date:
Subject: Re: Performance Enhancement/Fix for Array Utility Functions