.raw errors on date params w/ Postgres #2533
Labels
bug/2-confirmed
Bug has been reproduced and confirmed.
kind/bug
A reported bug.
tech/engines
Issue for tech Engines.
tech/typescript
Issue for tech TypeScript.
topic: raw
$queryRaw(Unsafe) and $executeRaw(Unsafe): https://www.prisma.io/docs/concepts/components/prisma-cli
Milestone
Bug description
When running a raw SQL query with
prisma.raw
and template literal params, I get the error below when querying on timestamp columns:How to reproduce
prisma.raw`select * from table where tzfield=${dateValue}`
dateValue
I tested with both ISO-formatted date strings and JS Date objects.Expected behavior
The query works and returns the same data as a query not involving timestamp fields.
Environment & setup
The text was updated successfully, but these errors were encountered: