Re: remove upsert example from docs - Mailing list pgsql-hackers

From Tom Lane
Subject Re: remove upsert example from docs
Date
Msg-id 26741.1281031762@sss.pgh.pa.us
Whole thread Raw
In response to remove upsert example from docs  (Merlin Moncure <mmoncure@gmail.com>)
Responses Re: remove upsert example from docs  (Andrew Dunstan <andrew@dunslane.net>)
Re: remove upsert example from docs  (Merlin Moncure <mmoncure@gmail.com>)
List pgsql-hackers
Merlin Moncure <mmoncure@gmail.com> writes:
> 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.

I was not persuaded that there's a real bug in practice.  IMO, his
problem was a broken trigger not broken upsert logic.  Even if we
conclude this is unsafe, simply removing the example is of no help to
anyone.  A more useful response would be to supply a correct example.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Greg Sabino Mullane"
Date:
Subject: Re: remove upsert example from docs
Next
From: Chris Browne
Date:
Subject: Re: Two different methods of sneaking non-immutable data into an index