-
Notifications
You must be signed in to change notification settings - Fork 857
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
Bug When Using Table Aliases: table alias "all_users" does not exist
#3169
Comments
Same thing here: when i set my where condition to a constant it works, but when the condition is dynamic, i get error:
|
I expect #3220 to fix this |
I have the same, table aliases are not recognaized |
same issue here with sqlite |
@kyleconroy a vanilla use case in probably the most popular non-embedded database, postgres (and seemingly also the most popular embedded database, sqlite), is broken, with a bad error message to boot. Can we get a TTR for this bug, guidance on acceptable PRs, or anything at all? |
+1 having this same issue, super annoying makes where clauses based on CTE's basically unusable |
Yeah, casting seems to remedy this, for whatever reason. |
Version
1.25.0
What happened?
Sqlc encounters issues when attempting to recognize table aliases specified within the WHERE clause, particularly when filtering selections using the syntax alias_table.field = 'something'.
I've provided a simple example to replicate the issue
Relevant log output
Database schema
SQL queries
Configuration
Playground URL
https://play.sqlc.dev/p/388ae1f5e3a9ab6c0185bdfce9ead7acbbb6ece3d6a52d828cd40184b109caf3
What operating system are you using?
Linux
What database engines are you using?
PostgreSQL
What type of code are you generating?
Go
The text was updated successfully, but these errors were encountered: