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

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Boszormenyi Zoltan <zb(at)cybertec(dot)at>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, 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-15 09:20:42
Message-ID: CAFj8pRCfEtO1_c03Qw1=zFt2r1CFqDkzBxAnLRqGC21Y8ytRtg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

2012/4/15 Boszormenyi Zoltan <zb(at)cybertec(dot)at>:
> 2012-04-14 18:15 keltezéssel, Peter Eisentraut írta:
>
>> On lör, 2012-04-14 at 08:23 -0400, Robert Haas wrote:
>>>
>>> On Sat, Apr 14, 2012 at 3:27 AM, Pavel Stehule<pavel(dot)stehule(at)gmail(dot)com>
>>>  wrote:
>>>>>
>>>>> 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
>>>
>>> What's ambiguous about that?
>>
>> I suppose one could wonder whether the LIMIT applies to the deleting or
>> just the returning.
>
>
> Ambigous only in this order. LIMIT x RETURNING * wouldn't be.

but theoretically you can has two LIMIT clauses in one SQL statements

DELETE FROM tab LIMIT n RETURNING * LIMIT m

without updatable CTE it is probably only one solution, but because we
have UCTE, then we don't need this construct.

Regards

Pavel

>
> --
> ----------------------------------
> Zoltán Böszörményi
> Cybertec Schönig&  Schönig GmbH
> Gröhrmühlgasse 26
> A-2700 Wiener Neustadt, Austria
> Web: http://www.postgresql-support.de
>     http://www.postgresql.at/
>

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2012-04-15 16:29:39 Re: BUG #6572: The example of SPI_execute is bogus
Previous Message Boszormenyi Zoltan 2012-04-15 09:14:38 Re: BUG #6572: The example of SPI_execute is bogus

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2012-04-15 09:26:01 Re: Clobbered parameter names via DECLARE in PL/PgSQL
Previous Message Boszormenyi Zoltan 2012-04-15 09:14:38 Re: BUG #6572: The example of SPI_execute is bogus