Skip to content

Commit

Permalink
Mark the assert_* functions as being Immutable (#8292)
Browse files Browse the repository at this point in the history
This seems basically semantically correct to me.

The motivation is that we use `assert_exists(<typname>{})` as a dummy
expression when making schema changes that affect schema expressions,
and currently it is possible to get errors due to that expression
being `Stable`.
  • Loading branch information
msullivan authored Feb 4, 2025
1 parent a52ad34 commit 79d6c86
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion edb/buildmeta.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
# The merge conflict there is a nice reminder that you probably need
# to write a patch in edb/pgsql/patches.py, and then you should preserve
# the old value.
EDGEDB_CATALOG_VERSION = 2024_01_28_00_00
EDGEDB_CATALOG_VERSION = 2024_02_03_00_00
EDGEDB_MAJOR_VERSION = 7


Expand Down
6 changes: 3 additions & 3 deletions edb/lib/std/20-genericfuncs.edgeql
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ std::assert_single(
CREATE ANNOTATION std::description :=
"Check that the input set contains at most one element, raise
CardinalityViolationError otherwise.";
SET volatility := 'Stable';
SET volatility := 'Immutable';
SET preserves_optionality := true;
USING SQL EXPRESSION;
};
Expand All @@ -49,7 +49,7 @@ std::assert_exists(
CREATE ANNOTATION std::description :=
"Check that the input set contains at least one element, raise
CardinalityViolationError otherwise.";
SET volatility := 'Stable';
SET volatility := 'Immutable';
SET preserves_upper_cardinality := true;
USING SQL EXPRESSION;
};
Expand All @@ -67,7 +67,7 @@ std::assert_distinct(
CREATE ANNOTATION std::description :=
"Check that the input set is a proper set, i.e. all elements
are unique";
SET volatility := 'Stable';
SET volatility := 'Immutable';
SET preserves_optionality := true;
SET preserves_upper_cardinality := true;
USING SQL EXPRESSION;
Expand Down

0 comments on commit 79d6c86

Please sign in to comment.