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 AST coverage check error #389

Merged
merged 1 commit into from
Jul 31, 2024
Merged

Fix AST coverage check error #389

merged 1 commit into from
Jul 31, 2024

Conversation

zookatron
Copy link
Contributor

Currently when you run a query against pg-mem with fully qualified column names like SELECT "public"."test"."val" FROM "public"."test", it gives you an AST coverage error like The query you ran generated an AST which parts have not been read by the query planner. This means that those parts could be ignored: ⇨ .columns[0].expr.table.name ("test"). This is happening because when the query planner retrieves the column data, in some cases it never actually checks the statement table name to be sure it matches before returning the column description. This commit refactors the column retrieval code to ensure this always gets checked.

I'm not familiar enough with the internal logic of this library to know if this fix is the "correct' way of doing this so I would like feedback on whether or not there is a better solution. But this logic fix makes sense to me so I figured I would start with a PR.

I believe this should fix this old bug as well: #130

@oguimbal oguimbal merged commit ba67048 into oguimbal:master Jul 31, 2024
@oguimbal
Copy link
Owner

see 2.9.0 release, thanks and sorry for the delay !

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.

2 participants