Skip to content

fix: parse column checks with pg_get_expr instead of substring - #1145

Open
hsusul wants to merge 1 commit into
supabase:masterfrom
hsusul:fix/column-check-not-valid-parse
Open

fix: parse column checks with pg_get_expr instead of substring#1145
hsusul wants to merge 1 commit into
supabase:masterfrom
hsusul:fix/column-check-not-valid-parse

Conversation

@hsusul

@hsusul hsusul commented Sep 4, 2026

Copy link
Copy Markdown

Summary

Test plan

  • npx vitest run test/index.test.ts -t "column check with NOT VALID|column check with NO INHERIT|column with multiple checks|dropping column checks"
  • Studio: inspect a column whose check was added with NOT VALID

NOT VALID and NO INHERIT suffixes made the old CHECK (...) length
heuristic return a corrupted expression into the columns API.
@hsusul
hsusul requested review from a team, avallete and soedirgo as code owners September 4, 2026 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Column check introspection corrupts expressions with NOT VALID / NO INHERIT

1 participant