Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/adapter-pg/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"@prisma/driver-adapter-utils": "workspace:*",
"pg": "^8.16.3",
"postgres-array": "3.0.4",
"@types/pg": "8.11.11"
"@types/pg": "^8.16.0"
},
"devDependencies": {
"@prisma/debug": "workspace:*"
Expand Down
12 changes: 0 additions & 12 deletions packages/adapter-pg/src/pg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,18 +109,6 @@ class PgQueryable<ClientT extends StdClient | TransactionClient> implements SqlQ
values,
rowMode: 'array',
types: {
// This is the error expected:
// No overload matches this call.
// The last overload gave the following error.
// Type '(oid: number, format?: any) => (json: string) => unknown' is not assignable to type '{ <T>(oid: number): TypeParser<string, string | T>; <T>(oid: number, format: "text"): TypeParser<string, string | T>; <T>(oid: number, format: "binary"): TypeParser<...>; }'.
// Type '(json: string) => unknown' is not assignable to type 'TypeParser<Buffer, any>'.
// Types of parameters 'json' and 'value' are incompatible.
// Type 'Buffer' is not assignable to type 'string'.ts(2769)
//
// Because pg-types types expect us to handle both binary and text protocol versions,
// where as far we can see, pg will ever pass only text version.
//
// @ts-expect-error
getTypeParser: (oid: number, format?) => {
if (format === 'text' && customParsers[oid]) {
return customParsers[oid]
Expand Down
13 changes: 11 additions & 2 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading