Revision 14253
Added by Aaron Marcuse-Kubitza over 10 years ago
trunk/schemas/util.sql | ||
---|---|---|
1850 | 1850 |
LANGUAGE sql STABLE |
1851 | 1851 |
AS $$ |
1852 | 1852 |
SELECT |
1853 |
util.check_constraint_enabled(def.col::util.table_item) -- already enabled |
|
1854 |
OR NOT util.table_has_data((def).col.table_) -- empty, so would always pass |
|
1853 |
-- expr not changing and constraint already enabled |
|
1854 |
def.expr IS NOT DISTINCT FROM util.derived_col_expr(def.col) |
|
1855 |
AND util.check_constraint_enabled(def.col::util.table_item) |
|
1856 |
OR |
|
1857 |
NOT util.table_has_data((def).col.table_) -- empty, so would always pass |
|
1855 | 1858 |
$$; |
1856 | 1859 |
|
1857 | 1860 |
|
Also available in: Unified diff
bugfix: derived_col_constraint_initially_enabled(): must be both already enabled and unchanged to be initially enabled (r14240 was only partially correct)