On 06/01/2026 12:59, Adriano dos Santos Fernandes wrote:
> Constraints (PK, FK, CHECK)
> • GTT: Supported
> • LTT: Not supported
What is the reason for lack of support for constraints.
None of the rules in (9075-2:2023) 11.6 <table constraint definition>,
11.7 <unique constraint definition>, 11.8 <referential constraint
definition>, and 11.9 <check constraint definition> say they should not
be supported. So, formally, they should be.
The only listed limitations are:
11.8 <referential constraint definition>, syntax rule 6(c):
"""
c) If the referencing table is a created local temporary table, then the
referenced table shall be either a global temporary table or a created
local temporary table.
"""
(So, a local temporary table is only allowed to reference global or
other local temporary tables).
11.9 <check constraint definition>, syntax rule 3(c)
"""
c) If T is a created local temporary table, then no <table reference>
generally contained in the <search condition> shall reference a table
other than either a global temporary table or a created local temporary
table.
"""
(Basically the same as previous, the check constraint may only reference
global or other local temporary tables).
--
Mark Rotteveel