db error: ERROR: prepared statement "s0" does not exist
See original GitHub issueBug description
Error: Error in connector: Error querying the database: Error querying the database: Error querying the database: db error: ERROR: prepared statement “s0” does not exist
How to reproduce
INDEXER_DATABASE_URL=“postgresql://public_readonly:nearprotocol@mainnet.db.explorer.indexer.near.dev/mainnet_explorer?schema=public” DEBUG=prisma:* npx prisma db pull
Expected behavior
schema.prisma
should be updated from the Postgresql database instead of throwing an error.
Prisma information
schema.prisma:
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "postgresql"
url = env("INDEXER_DATABASE_URL")
}
Environment & setup
- OS: MacOS
- Database: PostgreSQL
- Node.js version: 16.x
Prisma Version
prisma : 3.9.2
@prisma/client : 3.9.2
Current platform : darwin
Query Engine (Node-API) : libquery-engine bcc2ff906db47790ee902e7bbc76d7ffb1893009 (at node_modules/prisma/node_modules/@prisma/engines/libquery_engine-darwin.dylib.node)
Migration Engine : migration-engine-cli bcc2ff906db47790ee902e7bbc76d7ffb1893009 (at node_modules/prisma/node_modules/@prisma/engines/migration-engine-darwin)
Introspection Engine : introspection-core bcc2ff906db47790ee902e7bbc76d7ffb1893009 (at node_modules/prisma/node_modules/@prisma/engines/introspection-engine-darwin)
Format Binary : prisma-fmt bcc2ff906db47790ee902e7bbc76d7ffb1893009 (at node_modules/prisma/node_modules/@prisma/engines/prisma-fmt-darwin)
Default Engines Hash : bcc2ff906db47790ee902e7bbc76d7ffb1893009
Studio : 0.457.0
Issue Analytics
- State:
- Created 2 years ago
- Comments:13 (6 by maintainers)
Top Results From Across the Web
Configure Prisma Client with PgBouncer
PgBouncer holds a connection pool to the database and proxies incoming client ... Error querying the database: db error: ERROR: prepared statement "s0" ......
Read more >Davis on Twitter: "@TedSpare @supabase @prisma @nextjs ...
Error : undefined: Database error Error querying the database: db error: ERROR: prepared statement "s0" already exists" / Twitter ...
Read more >pq driver: prepared statement does not exist - Stack Overflow
If a Conn does not implement Queryer , the sql package's DB.Query will first prepare a query, execute the statement, and then close...
Read more >[Guide] Migrations & Connection Pool URLs (Supabase)
They don't necessarily let go of the database connections. ... the database: db error: ERROR: prepared statement "s0" already exists.
Read more >Prisma - Supabase
Connect your Supabase postgres database to your Prisma project. ... 2Error querying the database: db error: ERROR: prepared statement “s0” already exists.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It’s strange, after generate schema and client from near-indexer-for-explorer, it throw error when use rawQuery.
But it’s fine when use the db of the testnet
postgresql://public_readonly:nearprotocol@testnet.db.explorer.indexer.near.dev/testnet_explorer?schema=public
.&pgbouncer=true
doesn’t help.@winrey did you find a workaround for a mainnet db?