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
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-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

Browse pgsql-bugs by date

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

Browse pgsql-hackers by date

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