can’t use pooling url in prisma
while making use of the pooling flag for my database url, i get errors trying to run queries from prisma using $queryRaw
“prepared statement “s0” already exists”
sometimes the number is different though like s3, s4 etc.
i tried setting the directUrl field in my prisma schema to the pooling url along with databaseUrl being set to the normal url but that didn’t change things
only solution was to just set databaseUrl directly to the normal (non pooling) url and it worked fine that way.
5 Replies
deep-jade•2y ago
Hey! @Laurent , So depending on how you are constructing the query with
$queryRaw, certain values may not be able to be interpolated in a dynamic fashion. This is more to do with Postgres prepared statements. One scenario is dynamically setting a table name - this isn't possible (https://stackoverflow.com/a/47470438).
Are you able to share an example query that is hitting the error (with private info removed)? I'm curious if it has something to do with that first.rival-blackOP•2y ago
this is one of the queries
deep-jade•2y ago
I notice that the
client.$queryRaw is not awaiteddeep-jade•2y ago
also some interesting notes here - https://stackoverflow.com/a/74024104
Stack Overflow
Insert multiple rows with multiple fields with prisma raw query
I couldn't find any examples showing how to do this with integers and my options didn't work out(
My table contains 2 columns with integers and I need to add multiple rows to it using prisma raw qu...