Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: postgresql alter materialized view is not registered to statements #3728

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

swallowstalker
Copy link

solving the issue here #3371

basically if there are create mv - rename mv - drop mv, then on drop mv statement, the sqlc generate will fail because mv involved in rename statement is not registered to the list of statements, in short make them invisible to drop mv operations.

before

$ sqlc-dev generate -f internal/endtoend/testdata/ddl_rename_drop_materialized_views/postgresql/pgx/v5/sqlc.yaml
# package querytest
schema.sql:1:1: relation "authors_mv_old" does not exist

after (no error)

$ sqlc-dev generate -f internal/endtoend/testdata/ddl_rename_drop_materialized_views/postgresql/pgx/v5/sqlc.yaml

@swallowstalker
Copy link
Author

hi @kyleconroy, as this is my first PR in this repo, let me know if i needed to add some additional testing for this (i'm unable to assign you as reviewer in this PR, maybe its maintainer only)

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.

1 participant