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

SQLAChemy 1.4 POSTCOMPILE error #377

Closed
mrchoke opened this issue Aug 30, 2021 · 1 comment · Fixed by #378
Closed

SQLAChemy 1.4 POSTCOMPILE error #377

mrchoke opened this issue Aug 30, 2021 · 1 comment · Fixed by #378
Labels
bug Something isn't working

Comments

@mrchoke
Copy link

mrchoke commented Aug 30, 2021

I try new encode/databases and SQLAChemy 1.4 everything work fine, except

sql = select([TABLE]).where(TABLE.c.id.in_([1,3,4]))
print(databases.fetch_all(sql))

it produced error

psycopg2.errors.SyntaxError: syntax error at or near "["
LINE 3: WHERE TABLE.id IN ([POSTCOMPILE_1])

But I can use this query with pure SQLAChemy 1.4 core

sql = select([TABLE]).where(TABLE.c.id.in_([1,3,4]))
async with engine.connect() as conn:
      res = await conn.execute(sql)
print(res.fetchall())
@aminalaee
Copy link
Member

@mrchoke Thanks for reporting this.
You're right, this was changed in sqlalchemy 1.4 here

@aminalaee aminalaee added the bug Something isn't working label Sep 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants