Check expressions in create_constraint break when column name appears as substring in a function name
Author: imjackCreated Apr 16, 2026Updated Apr 28, 2026
Labelsbug
It appears when a create_constraint operation has a check expression that calls a function that name contains the column name as a substring, the migration fails with a "function does not exist" error.
- create_constraint:
type: check
table: my_table
name: my_check
columns:
- path
check: subpath(path, 2, 1) = 'foo'
up:
path: path
down:
path: pathIn the above example my column name is path and the function is subpath
I get the error:
pq: function sub_pgroll_new_path(ltree, integer, integer) does not existSource: xataio/pgroll