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

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

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Hitoshi Harada <umi(dot)tanuki(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 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-14 07:27:58
Message-ID: CAFj8pRA7O2TWeYt5dfpLQAFieLB57qD4=_dL+c4mYfDbsBCt-Q@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-hackers
2012/4/14 Robert Haas <robertmhaas(at)gmail(dot)com>:
> On Fri, Apr 13, 2012 at 10:43 PM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
>>> Yeah.  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.
>>
>> I don't agree - LIMIT after UPDATE or DELETE has no sense. Clean
>> solution should be based on using updateable CTE.
>
> It has a lot of sense.  Without it, it's very difficult to do logical
> replication on a table with no primary key.
>
> (Whether or not people should create such tables in the first place
> is, of course, beside the point.)

I am not against to functionality - I am against just to syntax DELETE
FROM tab LIMIT x

because is it ambiguous what means: DELETE FROM tab RETURNING * LIMIT x

Regards

Pavel

>
> --
> Robert Haas
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company

In response to

Responses

pgsql-hackers by date

Next:From: Greg SmithDate: 2012-04-14 07:31:47
Subject: Re: Last gasp
Previous:From: Greg SmithDate: 2012-04-14 07:27:52
Subject: Re: Patch: add timing of buffer I/O requests

pgsql-bugs by date

Next:From: Robert HaasDate: 2012-04-14 12:23:40
Subject: Re: BUG #6572: The example of SPI_execute is bogus
Previous:From: Robert HaasDate: 2012-04-14 04:21:22
Subject: Re: BUG #6572: The example of SPI_execute is bogus

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