Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PostgresError: syntax error at or near "$1" #864

Closed
josh-i386g opened this issue May 11, 2024 · 1 comment
Closed

PostgresError: syntax error at or near "$1" #864

josh-i386g opened this issue May 11, 2024 · 1 comment

Comments

@josh-i386g
Copy link

im using kysely and kysely-postgres-js

await pgdb.transaction().execute(async (db) => {
  const r1 = await sql`SET LOCAL c.user_id2 TO ${"test"};`.execute(db);
  console.log({ r1 });
});
node:internal/process/esm_loader:46
      internalBinding('errors').triggerUncaughtException(
                                ^

PostgresError: syntax error at or near "$1"
    at ErrorResponse (file://server/node_modules/postgres/src/connection.js:790:26)
    at handle (file://server/node_modules/postgres/src/connection.js:476:6)
    at Socket.data (file://server/node_modules/postgres/src/connection.js:315:9)
    at Socket.emit (node:events:514:28)
    at addChunk (node:internal/streams/readable:343:12)
    at readableAddChunk (node:internal/streams/readable:316:9)
    at Readable.push (node:internal/streams/readable:253:10)
    at TCP.onStreamRead (node:internal/stream_base_commons:190:23) {
  severity_local: 'ERROR',
  severity: 'ERROR',
  code: '42601',
  position: '25',
  file: 'scan.l',
  line: '1241',
  routine: 'scanner_yyerror'
}

Node.js v20.5.1
@josh-i386g
Copy link
Author

Solved at #640 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant