Skip site navigation (1) Skip section navigation (2)

Re: BUG #6572: The example of SPI_execute is bogus

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Hitoshi Harada <umi(dot)tanuki(at)gmail(dot)com>, pgsql-bugs(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: BUG #6572: The example of SPI_execute is bogus
Date: 2012-04-18 15:11:14
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugspgsql-hackers
On Sun, Apr 15, 2012 at 12:29 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> I think it would be a good idea for UPDATE and DELETE to expose
>> a LIMIT option, but I can't really see the virtue in making that
>> functionality available only through SPI.
> FWIW, I'm not excited about that.  You can get well-defined behavior
> today from a SELECT/LIMIT drawing from a writable CTE (namely, that
> the UPDATE/DELETE runs to completion but you only see a subset of
> its RETURNING result).  LIMIT directly on the UPDATE/DELETE would be
> ill-defined, unless perhaps you want to also invent a way of specifying
> the order in which rows get selected for update; but I don't want to
> go there.

In the use cases I'm thinking of, it doesn't matter which row you
decide to update or delete, only that you pick a single one.

Robert Haas
The Enterprise PostgreSQL Company

In response to

pgsql-hackers by date

Next:From: Kevin GrittnerDate: 2012-04-18 15:29:35
Subject: Re: Bug tracker tool we need
Previous:From: Robert HaasDate: 2012-04-18 15:09:12
Subject: Re: Aggressive memory consumption in {ts,array}_typanalyze

pgsql-bugs by date

Next:From: Robert HaasDate: 2012-04-18 15:45:28
Subject: Re: BUG #6204: Using plperl functions generate crash
Previous:From: Alvaro HerreraDate: 2012-04-18 15:02:25
Subject: Re: BUG #6593: REASSIGN OWNED fails on extensions

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group