Skip to content
This repository was archived by the owner on Aug 19, 2025. It is now read-only.
This repository was archived by the owner on Aug 19, 2025. It is now read-only.

SQLAChemy 1.4 POSTCOMPILE error #377

Closed

Description

@mrchoke

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())

Activity

  1. aminalaee commented on Aug 31, 2021

    @aminalaee
    Contributor

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

  2. added
    bug
    on Sep 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions