I have a raw SQL statement to be executed using SqlAlchemy. The query contains this:
FROM unnest(array['sku1', 'sku2', 'sku3'])
Building the query manually, I could not find a way to escape each parameter manually.
I tried doing:
session.execute("... FROM unnest(array[:skus]) ...", {'skus': skus})
but:
ProgrammingError: (ProgrammingError) a column definition list is required for functions returning "record"
LINE 21: FROM unnest(array[('sku1', 'sku2', '...
^