Open sleepylemur opened 3 months ago
Thanks for the detailed bug report, I can reproduce the error. I've also verified that this doesn't happen in the JS client.
Thanks for investigating. Again, low priority on our end due to there being an easy workaround.
Bug description
When passing an empty list to a query that coerces it to timestamps, a subsequent call with a non empty list causes the db to throw an exception.
Throws
ERROR: improper binary format in array element 1
:If the list is always non-empty or the list is always empty, everything works fine.
Works fine:
Also works fine:
This wasn't terribly hard to work around once we understood what was happening, but took a bit of effort to debug because of the surprising behavior.
How to reproduce
Run example.py with a postgresql database:
DATABASE_URL="postgresql://$USER@0.0.0.0:5432/postgres" python -m example
example.py
Expected behavior
Prisma/PostgreSQL throws
Prisma information
Not relevant
Environment & setup