remove upsert example from docs

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: remove upsert example from docs
Date: 2010-08-05 17:44:52
Message-ID: AANLkTikFTBBjy=L_ipCRc8fBubTwwugcfWQKpLOnX9Zp@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 Content-Type Size
rm_upsert.patch text/x-patch 1.8 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2010-08-05 17:52:05 Re: Performance Enhancement/Fix for Array Utility Functions
Previous Message Alvaro Herrera 2010-08-05 17:41:01 Re: BUG #5599: Vacuum fails due to index corruption issues