Subject Re: [firebird-support] Problem returning multiple rows from a CTE-recursive procedure
Author Dimitry Sibiryakov
03.05.2018 23:04, blackfalconsoftware@... [firebird-support] wrote:
> However, I though only the issuance one "SUSPEND" was enough to flush the entire buffer of
> all records...

No. One SUSPEND - one record in result set. Two SUSPENDs - two records and so on.

Watch this in isql:

SQL> set term GO;
SQL> EXECUTE BLOCK RETURNS (A INTEGER)
CON> AS
CON> begin
CON> a = 1;
CON> SUSPEND; -- return a record containing 1
CON> a = 2;
CON> SUSPEND; -- return a record containing 2
CON> SUSPEND; -- return another record containing 2
CON> end
CON> GO

A
============
1
2
2

--
WBR, SD.