[Firebird-devel] RETURNING clause returning NULL row when no value was updated

2017-11-29 Thread Jiří Činčura
Hi *, both 2.5.7 and 3.0.3 have same behavior, so it's probably expected. But still, looks wrong to me (in such case educate me). SQL> create table foobar (id int primary key, foo int, bar generated always as (foo+1)); SQL> insert into foobar values (1, 1); SQL> update foobar set foo = 2 where id

Re: [Firebird-devel] RETURNING clause returning NULL row when no value was updated

2017-11-29 Thread Omacht András
values is valid, otherwise no update were made. András -Original Message- From: Jiří Činčura [mailto:j...@cincura.net] Sent: Wednesday, November 29, 2017 11:52 AM To: For discussion among Firebird Developers Subject: [Firebird-devel] RETURNING clause returning NULL row when no value was updat

Re: [Firebird-devel] RETURNING clause returning NULL row when no value was updated

2017-11-29 Thread Dimitry Sibiryakov
29.11.2017 11:51, Jiří Činčura wrote: The second update did not update any records, yet it still returns one row in result with NULL value. Shouldn't it return empty result set? "Update returning" is the same as "execute procedure". It returns fixed set of values, not a result set. -- W

Re: [Firebird-devel] RETURNING clause returning NULL row when no value was updated

2017-11-29 Thread Gabor Boros
2017. 11. 29. 11:51 keltezéssel, Jiří Činčura írta: Hi *, both 2.5.7 and 3.0.3 have same behavior, so it's probably expected. But still, looks wrong to me (in such case educate me). Hi, "In DSQL, a statement with RETURNING always returns a single row. If the statement updates no records, the

Re: [Firebird-devel] RETURNING clause returning NULL row when no value was updated

2017-11-29 Thread Jiří Činčura
>"Update returning" is the same as "execute procedure". It returns >fixed set of values, > not a result set. Hmm. I lived in a dream. I would argue that the i.e. "update foobar set foo = 2 returning bar;" would return multiple rows and is allowed since 2.5. But quick test now shows that e

Re: [Firebird-devel] RETURNING clause returning NULL row when no value was updated

2017-11-29 Thread livius
: firebird-devel@lists.sourceforge.net Subject: Re: [Firebird-devel] RETURNING clause returning NULL row when no value was updated "Update returning" is the same as "execute procedure". It returns fixed set of values, not a result set. Hmm. I lived in a dream. I woul

Re: [Firebird-devel] RETURNING clause returning NULL row when no value was updated

2017-11-30 Thread Jiří Činčura
: Re: [Firebird-devel] RETURNING clause returning NULL > row when no> value was updated > > >"Update returning" is the same as "execute procedure". It returns> > > > fixed set of values, > > not a result set. > > Hmm. I lived in a drea