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(analyzer): Error on unexpanded star expression #2882

Merged
merged 2 commits into from
Oct 19, 2023

Conversation

kyleconroy
Copy link
Collaborator

If a query includes a star reference, error if we're unable to expand that reference. The new analyzer will happily anaylyze that code. If executed at runtime, these queries could change values.

Fixes #2880

If a query includes a star reference, error if we're unable to expand
that reference. The new analyzer will happily anaylyze that code. If
executed at runtime, these queries could change values.
@kyleconroy kyleconroy merged commit 72c08a4 into main Oct 19, 2023
8 checks passed
@kyleconroy kyleconroy deleted the kyle/verify-star-expansion branch October 19, 2023 15:50
@prog8
Copy link

prog8 commented Oct 18, 2024

Hi @kyleconroy,

I'm experiencing an issue with sqlc when trying to infer the schema solely from my database, without relying on schema files. The reason for this approach is that Postgres supports a wide range of features, including function overloading, which can be challenging for sqlc to fully support.

When I attempt to fetch data using a query like SELECT * FROM table, I encounter an error stating star expansion failed for query. However, if I comment out the line that triggers this error, everything works as expected.

I'm wondering if there's a workaround or a nice way to handle the star expansion feature in this scenario. Any guidance would be greatly appreciated.

Thanks in advance.

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.

Fail analyzing a query if star expansion fails
2 participants