On 11/29/2010 10:19 PM, Robert Haas wrote:
For example, suppose we're trying to govern an ancient Greek democracy: http://en.wikipedia.org/wiki/Ostracism DELETE FROM residents_of_athens ORDER BY ostracism_votes DESC LIMIT 1;
I'm not sure this is a very good example. Assuming there isn't a tie, I'd do it like this:
DELETE FROM residents_of_athens WHERE ostracism_votes >= 6000 and ostracism_votes = (SELECT max(ostracism_votes) FROM residents_of_athens); I can't say I'd be excited by this feature. In quite a few years of writing SQL I don't recall ever wanting such a gadget. cheers andrew