Re: Writeable CTEs
От | Greg Stark |
---|---|
Тема | Re: Writeable CTEs |
Дата | |
Msg-id | 407d949e1001050921s20dbea72nee846c27da29bcaa@mail.gmail.com обсуждение исходный текст |
Ответ на | Writeable CTEs (Marko Tiikkaja <marko.tiikkaja@cs.helsinki.fi>) |
Ответы |
Re: Writeable CTEs
Re: Writeable CTEs |
Список | pgsql-hackers |
On Tue, Jan 5, 2010 at 4:42 PM, Marko Tiikkaja <marko.tiikkaja@cs.helsinki.fi> wrote: > => with t as (delete from foo returning *) > -> insert into bar > -> select * from t; > INSERT 0 2 > > It correctly reports 2 affected rows (one deleted and one inserted), but is > this the answer we want? It doesn't seem all that useful to know the total > amount of affected rows. My first thought is that the number should correspond to the INSERT. It didn't INSERT two rows so it seems wrong. More importantly in a case like 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. -- greg
В списке pgsql-hackers по дате отправления: