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 routine).

I'd consider about CREATE'd LTT as attachment-private object. I see
no need to store its definition at the persistent schema.

If multiple procedures process the same layout of temporary data, IMHO
it's handier to create such LTT definition once (as persistent) rather
than declare the same LTT in the every procedure (or attachment).

   First, CREATE'd LTT's have the visibility scope and lifetime of the
attachment.
Its definition is not seen by other attachments and every attachment
could have
LTT with the same name and different definition. Second, attachment
could have
private part (instance) of metadata cache that will contains definitions
of every
CREATE'd LTT and every statement could use it without additional penalty.

   No need to pollute persistent schema with temporary objects and pay
runtime
cost for storing\erasing such definitions.


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
   definition\loading into metadata cache. Such LTT's definition should be not 
changed
   while dependend PSQL routine reside in metadata cache, or PSQL routine 
should be
   invalidated when LTT definition it depends on is changed.

  Of course, there could be something else, lets continue to think on it.

Regards,
Vlad


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to