Re: [Firebird-devel] Lateral derived tables (was: Plans to support cross and outer apply)

2017-09-08 Thread Leyne, Sean
Dmitry, > Opinions, please. > > My personal votes: 1d, 2c, 3a, 4b For myself: 1d, 2c, 3a or 3b, 4b -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org!

Re: [Firebird-devel] Lateral derived tables

2017-09-08 Thread Dmitry Yemanov
08.09.2017 16:55, Mark Rotteveel wrote: %type table_primary table_primary : table_proc | derived_table | '(' joined_table ')' ; IMHO, it wouldn't look logical to support LATERAL for "table_proc" but disallow it for "joined table". But LATERAL **is** a table_primary, it

Re: [Firebird-devel] Lateral derived tables

2017-09-08 Thread Mark Rotteveel
On 8-9-2017 15:26, Dmitry Yemanov wrote: 08.09.2017 15:31, Mark Rotteveel wrote: Isn't this all contained in the SQL specification? Reading the spec may differ. And we don't follow the standard strictly sometimes. 3) LATERAL was historically implied for joined stored procedures, e.g. I

Re: [Firebird-devel] Lateral derived tables

2017-09-08 Thread Dmitry Yemanov
08.09.2017 15:31, Mark Rotteveel wrote: Isn't this all contained in the SQL specification? Reading the spec may differ. And we don't follow the standard strictly sometimes. 3) LATERAL was historically implied for joined stored procedures, e.g. I suggest 3b 4) LATERAL in nested

Re: [Firebird-devel] Lateral derived tables

2017-09-08 Thread Mark Rotteveel
On 8-9-2017 10:03, Dmitry Yemanov wrote: All, The key point of this standard feature is to allow sub-queries to reference priorly defined contexts (in joins). While thinking about this, I have a few questions to raise here. The standard defines LATERAL for derived tables only. This sounds

Re: [Firebird-devel] Lateral derived tables (was: Plans to support cross and outer apply)

2017-09-08 Thread Jiří Činčura
Hi, 1a 2c 3b 4b -- Mgr. Jiří Činčura https://www.tabsoverspaces.com/ -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot Firebird-Devel

Re: [Firebird-devel] Lateral derived tables (was: Plans to support cross and outer apply)

2017-09-08 Thread liviuslivius
Hi, 1aBecause it is the same asFROM LEFT JOIN (SELECT) 2a LATERAL is for context reference and cannot be missed 3b if it work already as lateral but is this the true? Or only for referenced stored proc? 4b as it should be derived table Regards,Karol Bieniaszewski Oryginalna wiadomość

[Firebird-devel] Lateral derived tables (was: Plans to support cross and outer apply)

2017-09-08 Thread Dmitry Yemanov
All, The key point of this standard feature is to allow sub-queries to reference priorly defined contexts (in joins). While thinking about this, I have a few questions to raise here. The standard defines LATERAL for derived tables only. This sounds logical but there are some corner cases to