I must say that i thinked about this in the same way as you.
And i also do not know from where i got this impression ...
I really supposed that it return resultset
regards,
Karol Bieniaszewski
-Oryginalna wiadomość-
From: Jiří Činčura
Sent: Wednesday, November 29, 2017 1:32 PM
To: fir
>"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
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
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
Hi!
"With this I don't know whether the RETURNING returns NULL as a new value or
nothing was updated. I would have to go to PSQL and use ROW_COUNT or something
like that."
Workaround:
update foobar set foo = 2 where id = 1 returning id, bar;
if id is null then bar null values is valid, otherwi
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
On 11/29/17 10:57, Jiří Činčura wrote:
OK, the Firebird-4.0.0.816-0_Win32 behaves correctly. Will this go into
3.0.3 as well?
As you can already see it's fixed in FB3 branch too.
--
Check out the vibrant tech commun