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

(Select Into) doesn't return DDL tables #280

Closed
OmarQunsul opened this issue Mar 21, 2023 · 2 comments · Fixed by #281
Closed

(Select Into) doesn't return DDL tables #280

OmarQunsul opened this issue Mar 21, 2023 · 2 comments · Fixed by #281

Comments

@OmarQunsul
Copy link

select info creates a new table, but the parsed query doesn't return any tables for ddl_tables

parsed = PgQuery.parse "select * into new_users from users"
parsed.ddl_tables # [] which is wrong, it should contain ["new_users"]
parsed.dml_tables # [] correct

Reference: https://www.postgresql.org/docs/current/sql-selectinto.html

@lfittl
Copy link
Member

lfittl commented Mar 24, 2023

Thanks for the report!

Could you review whether #281 fixes this as you'd expect it to work?

@OmarQunsul
Copy link
Author

@lfittl yes, it works 💯 thank you

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 a pull request may close this issue.

2 participants