Re: Writeable CTEs

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: Writeable CTEs
Дата
Msg-id 4B43AD34.5060101@agliodbs.com
обсуждение исходный текст
Ответ на Re: Writeable CTEs  (Marko Tiikkaja <marko.tiikkaja@cs.helsinki.fi>)
Ответы Re: Writeable CTEs  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On 1/5/10 9:45 AM, Marko Tiikkaja wrote:
> On 2010-01-05 19:21 +0200, Greg Stark wrote:
>> with t as (delete from foo returning *)
>> select * from t where x=?
>>
>> applications will almost certainly expect the number to match the
>> actual number of rows returned and may well misbehave if they don't.
> 
> I probably wasn't clear about the actual problem in the original post.
> The problem only affects INSERT, UDPATE and DELETE where you are
> actually counting affected rows (i.e. PQcmdTuples(), not PQntuples()) so
> the this example would work as expected.

I don't think there is an "as expected" for this situation; people won't
know what to expect. So what do we think is resonable?  The current
behavior, which reports the total count of rows expected, works for me.

--Josh Berkus


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Proposal: XML helper functions
Следующее
От: "Kevin Grittner"
Дата:
Сообщение: Re: true serializability and predicate locking