Liquibase diff fails on "unknown function: pg_sequence_last_value()" #105957
Labels
C-bug
Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
O-community
Originated from the community
T-sql-foundations
SQL Foundations Team (formerly SQL Schema + SQL Sessions)
X-blathers-triaged
blathers was able to find an owner
Projects
Describe the problem
I'm using Liquibase to manage database migrations. When running a diff with Hibernate it throw an error stating that the function
pg_sequence_last_value
is undefined. See below for the stack trace including SQL query.To Reproduce
Error executing SQL SELECT ns.nspname as SCHEMA_NAME, td.relname as TABLE_NAME, pa.attname as COLUMN_NAME, COALESCE(pg_sequence_last_value(c.oid::regclass) + s.seqincrement, s.seqstart) AS START_VALUE, s.seqincrement AS INCREMENT_BY FROM pg_class c JOIN pg_sequence s on c.oid = s.seqrelid JOIN pg_namespace ns on c.relnamespace = ns.oid JOIN pg_depend d ON c.oid = d.objid JOIN pg_class td ON td.oid = d.refobjid JOIN pg_attribute pa ON pa.attrelid=td.oid AND pa.attnum=d.refobjsubid WHERE c.relkind = 'S' AND d.deptype = 'a': ERROR: unknown function: pg_sequence_last_value(): function undefined
being thrownExpected behavior
SQL query successful, changelog generated includes all changes
Additional data / screenshots
Stack trace:
Environment:
Additional context
Jira issue: CRDB-29285
Epic CRDB-27601
The text was updated successfully, but these errors were encountered: