On 27/05/2025 12:39, Adriano dos Santos Fernandes wrote:
> On 26/05/2025 08:29, 'Mark Rotteveel' via firebird-devel wrote:
>> On 26/05/2025 13:17, Adriano dos Santos Fernandes wrote:
>>> I started to design/implement Created LTTs.
>>>
>>> These are tables that lives only inside an attachment, without any
>>> metadata stored. Like GTTs, they have data bound to either the
>>> connection or the transaction.
>>>
>>> In PSQL, they cannot be used directly, but can with EXECUTE STATEMENT.
>>
>> I know that for PSQL using a GTT would be the better option,
>
> Better for who? When?
>
> I guess it's not better in an environment where developers need to ask,
> wait and justify DBAs to update database, when developer just want to
> make his work. I hope you understand this is not uncommon.
If you can create procedures, I assume you can also create GTTs. But OK,
I didn't consider execute block in this.
>> but the
>> only times I've used LTTs in other DBMSes (that I can recall) was in
>> procedural code.
>
>
>> Why this restriction?
>>
>
> We can allow it in EXECUTE BLOCK. It just doesn't fit with persistent
> routines, which should be valid in the creation moment and should
> prevent dependencies to make them invalid.
Why not? The LTT would be created during execution of the routine, and
be gone when execution ends. There is no (external) dependency, as the
declaration and usage is within that routine.
Mark
--
Mark Rotteveel