Parameterized ExecuteRaw breaks with Postgres Floats #9949
Labels
bug/1-unconfirmed
Bug should have enough information for reproduction, but confirmation has not happened yet.
kind/bug
A reported bug.
status/needs-repro-confirmation
team/client
Issue for team Client.
topic: floating point types
Topic related to floating point types and precision loss
topic: postgresql
topic: raw
$queryRaw(Unsafe) and $executeRaw(Unsafe): https://www.prisma.io/docs/concepts/components/prisma-cli
Milestone
Bug description
Prisma's executeRaw function doesn't seem to work properly with Postgres's float types (both DoublePrecision and Real.) I've shared my findings and reproduction below.
How to reproduce
This repository contains a minimal reproduction: https://github.com/aust1nz/prisma-float-bugreport. You'll need to run
npx prisma migrate
and run the database with Docker Compose. Running npm start will run thesrc/insert.ts
script.Here's some more detail, pulled from the repo:
Prisma Schema:
Insertion Issues
Expected behavior
Inserting with the prisma API and directly inserting raw strings into the database both have the intended effect. I'd expect parameters in the executeRaw to insert accordingly.
Prisma information
Prisma info is shared above in the How to reproduce section.
Environment & setup
This occurs on MacOS. The database is a Postgres database running on Docker. Using Node 14.15.4.
Prisma Version
The text was updated successfully, but these errors were encountered: