Re: [Firebird-devel] Local tables

2022-03-16 Thread Adriano dos Santos Fernandes
On 16/03/2022 00:45, Dmitry Yemanov wrote: > 15.03.2022 21:43, Adriano dos Santos Fernandes wrote: >> >>> In fact, what you priorly define as LT is IMO "declared" LTT. >> >> I had that impression before read the standard, but then I changed my >> opinion. > > "Part 4: Persistent Stored Modules

Re: [Firebird-devel] Local tables

2022-03-16 Thread Vlad Khorsun
15.03.2022 20:14, Adriano dos Santos Fernandes wrote: On 15/03/2022 14:02, Vlad Khorsun wrote: SQL standard defines LOCAL TEMPORARY TABLES (LTT), which may be "created" or "declared". The semantics of these standard specs are different and not very easy applicable to Firebird as they are

Re: [Firebird-devel] Local tables

2022-03-16 Thread Vlad Khorsun
15.03.2022 20:50, Adriano dos Santos Fernandes write: On 15/03/2022 15:20, Vlad Khorsun wrote: So CREATEd LTTs cannot be used in PSQL routines, only by DSQL?   At first look I see two way's to go: a) PSQL routines can't see CREATE'd LTT's, or b) PSQL routines can see and use LTT definition

Re: [Firebird-devel] Local tables

2022-03-16 Thread Vlad Khorsun
15.03.2022 19:41, Dmitry Yemanov wrote: Anyway, IMO "declared" LTTs are much more useful than "created" LTTs, so the latter ones may be deferred. Or we may live without them at all ;-) CREATE'd LTT's could be very useful to store\materialize intermediate results of complex evaluations.

Re: [Firebird-devel] Local tables

2022-03-16 Thread Alex Peshkoff via Firebird-devel
On 3/15/22 20:41, Dmitry Yemanov wrote: 15.03.2022 20:31, Alex Peshkoff via Firebird-devel wrote: For me, "created" LTT is similar to GTT (i.e. stored in the schema) but with data isolated per request (per PSQL routine). I'd consider about CREATE'd LTT as attachment-private object. I see

Re: [Firebird-devel] Local tables

2022-03-15 Thread Dmitry Yemanov
15.03.2022 21:43, Adriano dos Santos Fernandes wrote: In fact, what you priorly define as LT is IMO "declared" LTT. I had that impression before read the standard, but then I changed my opinion. "Part 4: Persistent Stored Modules (SQL/PSM)" is about PSQL, AFAIU. It includes: "12.8 " that

Re: [Firebird-devel] Local tables

2022-03-15 Thread Adriano dos Santos Fernandes
On 15/03/2022 15:20, Vlad Khorsun wrote: >> So CREATEd LTTs cannot be used in PSQL routines, only by DSQL? > >   At first look I see two way's to go: > a) PSQL routines can't see CREATE'd LTT's, or > b) PSQL routines can see and use LTT definition that exists at the > moment of routine >   

Re: [Firebird-devel] Local tables

2022-03-15 Thread Adriano dos Santos Fernandes
On 15/03/2022 15:00, Adriano dos Santos Fernandes wrote: >> Would it be possible to use some other word to distinguish, instead of >> just leaving out "local" (which essentially loses the most important >> aspect of what it really is)? >> >> Suggestions for thought: >> >> Internal? >> Volatile?

Re: [Firebird-devel] Local tables

2022-03-15 Thread Adriano dos Santos Fernandes
On 15/03/2022 14:07, Dmitry Yemanov wrote: > 15.03.2022 17:14, Adriano dos Santos Fernandes wrote: >> >> As part of "Support multiple rows for DML RETURNING (#6815)" feature, >> BLR verbs for "local table" were created. >> >> Local tables (LT) as defined there works outside transaction control. >>

Re: [Firebird-devel] Local tables

2022-03-15 Thread Adriano dos Santos Fernandes
On 15/03/2022 13:00, Dimitry Sibiryakov wrote: > Adriano dos Santos Fernandes wrote 15.03.2022 15:37: >> On 15/03/2022 11:23, Alex Peshkoff via Firebird-devel wrote: >>> Very interesting - but other name for them should be used. It's too easy >>> to loose difference between LT & LTT that are

Re: [Firebird-devel] Local tables

2022-03-15 Thread Vlad Khorsun
15.03.2022 19:56, Adriano dos Santos Fernandes wrote: On 15/03/2022 14:39, Vlad Khorsun wrote: 15.03.2022 19:27, Dmitry Yemanov wrote: 15.03.2022 20:17, Vlad Khorsun wrote: For me, "created" LTT is similar to GTT (i.e. stored in the schema) but with data isolated per request (per PSQL

Re: [Firebird-devel] Local tables

2022-03-15 Thread Adriano dos Santos Fernandes
On 15/03/2022 14:02, Vlad Khorsun wrote: > >> SQL standard defines LOCAL TEMPORARY TABLES (LTT), which may be >> "created" or "declared". The semantics of these standard specs are >> different and not very easy applicable to Firebird as they are based on >> standard notion of modules, that is not

Re: [Firebird-devel] Local tables

2022-03-15 Thread Dimitry Sibiryakov
Vlad Khorsun wrote 15.03.2022 18:39:   No need to pollute persistent schema with temporary objects and pay runtime cost for storing\erasing such definitions. That's a good occasion for creating a virtual metadata dictionary that provides records for persistent objects as well as

Re: [Firebird-devel] Local tables

2022-03-15 Thread Adriano dos Santos Fernandes
On 15/03/2022 12:03, Kjell Rilbe wrote: > Den 2022-03-15 kl. 15:37, skrev Adriano dos Santos Fernandes: >> On 15/03/2022 11:23, Alex Peshkoff via Firebird-devel wrote: >>> Very interesting - but other name for them should be used. It's too easy >>> to loose difference between LT & LTT that are

Re: [Firebird-devel] Local tables

2022-03-15 Thread Adriano dos Santos Fernandes
On 15/03/2022 14:39, Vlad Khorsun wrote: > 15.03.2022 19:27, Dmitry Yemanov wrote: >> 15.03.2022 20:17, Vlad Khorsun wrote: >>> For me, "created" LTT is similar to GTT (i.e. stored in the schema) but with data isolated per request (per PSQL routine). >>> >>> I'd consider about CREATE'd

Re: [Firebird-devel] Local tables

2022-03-15 Thread Dmitry Yemanov
15.03.2022 20:31, Alex Peshkoff via Firebird-devel wrote: For me, "created" LTT is similar to GTT (i.e. stored in the schema) but with data isolated per request (per PSQL routine). I'd consider about CREATE'd LTT as attachment-private object. I see no need to store its definition at the

Re: [Firebird-devel] Local tables

2022-03-15 Thread Vlad Khorsun
15.03.2022 19:27, Dmitry Yemanov wrote: 15.03.2022 20:17, Vlad Khorsun wrote: For me, "created" LTT is similar to GTT (i.e. stored in the schema) but with data isolated per request (per PSQL routine). I'd consider about CREATE'd LTT as attachment-private object. I see no need to store its

Re: [Firebird-devel] Local tables

2022-03-15 Thread Alex Peshkoff via Firebird-devel
On 3/15/22 20:27, Dmitry Yemanov wrote: 15.03.2022 20:17, Vlad Khorsun wrote: For me, "created" LTT is similar to GTT (i.e. stored in the schema) but with data isolated per request (per PSQL routine). I'd consider about CREATE'd LTT as attachment-private object. I see no need to store its

Re: [Firebird-devel] Local tables

2022-03-15 Thread Dmitry Yemanov
15.03.2022 20:17, Vlad Khorsun wrote: For me, "created" LTT is similar to GTT (i.e. stored in the schema) but with data isolated per request (per PSQL routine). I'd consider about CREATE'd LTT as attachment-private object. I see no need to store its definition at the persistent schema.

Re: [Firebird-devel] Local tables

2022-03-15 Thread Vlad Khorsun
15.03.2022 19:07, Dmitry Yemanov wrote: SQL standard defines LOCAL TEMPORARY TABLES (LTT), which may be "created" or "declared". The semantics of these standard specs are different and not very easy applicable to Firebird as they are based on standard notion of modules, that is not similar to

Re: [Firebird-devel] Local tables

2022-03-15 Thread Dmitry Yemanov
15.03.2022 17:14, Adriano dos Santos Fernandes wrote: As part of "Support multiple rows for DML RETURNING (#6815)" feature, BLR verbs for "local table" were created. Local tables (LT) as defined there works outside transaction control. For #6815 this does not matter, but I want to add LT

Re: [Firebird-devel] Local tables

2022-03-15 Thread Vlad Khorsun
15.03.2022 18:00, Dimitry Sibiryakov wrote: Adriano dos Santos Fernandes wrote 15.03.2022 15:37: On 15/03/2022 11:23, Alex Peshkoff via Firebird-devel wrote: Very interesting - but other name for them should be used. It's too easy to loose difference between LT & LTT that are absolutely

Re: [Firebird-devel] Local tables

2022-03-15 Thread Vlad Khorsun
15.03.2022 16:14, Adriano dos Santos Fernandes wrote: Hi! As part of "Support multiple rows for DML RETURNING (#6815)" feature, BLR verbs for "local table" were created. Local tables (LT) as defined there works outside transaction control. For #6815 this does not matter, but I want to add LT

Re: [Firebird-devel] Local tables

2022-03-15 Thread Dmitry Yemanov
15.03.2022 18:03, Kjell Rilbe wrote: From a linguistic point of view I find "declared" to be a nonsense qualification of "table". Aren't all tables declared in a sense? Maybe, but this is what SQL spec suggests. In PSQL, we have any locals syntactically "declared" -- DECLARE VARIABLE,

Re: [Firebird-devel] Local tables

2022-03-15 Thread Dimitry Sibiryakov
Adriano dos Santos Fernandes wrote 15.03.2022 15:37: On 15/03/2022 11:23, Alex Peshkoff via Firebird-devel wrote: Very interesting - but other name for them should be used. It's too easy to loose difference between LT & LTT that are absolutely different things. Maybe just "DECLARE TABLE"

Re: [Firebird-devel] Local tables

2022-03-15 Thread Kjell Rilbe
Den 2022-03-15 kl. 15:37, skrev Adriano dos Santos Fernandes: On 15/03/2022 11:23, Alex Peshkoff via Firebird-devel wrote: Very interesting - but other name for them should be used. It's too easy to loose difference between LT & LTT that are absolutely different things. Maybe just "DECLARE

Re: [Firebird-devel] Local tables

2022-03-15 Thread Adriano dos Santos Fernandes
On 15/03/2022 11:23, Alex Peshkoff via Firebird-devel wrote: > > Very interesting - but other name for them should be used. It's too easy > to loose difference between LT & LTT that are absolutely different things. > Maybe just "DECLARE TABLE" then? We would refer to them as "declared tables".

Re: [Firebird-devel] Local tables

2022-03-15 Thread Alex Peshkoff via Firebird-devel
On 3/15/22 17:14, Adriano dos Santos Fernandes wrote: Hi! As part of "Support multiple rows for DML RETURNING (#6815)" feature, BLR verbs for "local table" were created. Local tables (LT) as defined there works outside transaction control. For #6815 this does not matter, but I want to add LT

[Firebird-devel] Local tables

2022-03-15 Thread Adriano dos Santos Fernandes
Hi! As part of "Support multiple rows for DML RETURNING (#6815)" feature, BLR verbs for "local table" were created. Local tables (LT) as defined there works outside transaction control. For #6815 this does not matter, but I want to add LT feature that will use these verbs. LTs are defined