BifocalCanvas
BifocalCanvas
Explore posts from servers
DTDrizzle Team
Created by BifocalCanvas on 3/8/2024 in #help
Random `PostgresError: invalid input syntax for type bigint`
When attempting to query my database with db.select().from(roster) I get that error even though I made sure each column type is correct in my schema.ts file. Here is the full query line:
let newest = await db.select().from(roster).limit(3);
let newest = await db.select().from(roster).limit(3);
and here is the entire error:
PostgresError: invalid input syntax for type bigint: "newest"
at ErrorResponse (/Users/svalencia/projects/svalencia014/zjx-express/node_modules/postgres/cjs/src/connection.js:790:26)
at handle (/Users/svalencia/projects/svalencia014/zjx-express/node_modules/postgres/cjs/src/connection.js:476:6)
at Socket.data (/Users/svalencia/projects/svalencia014/zjx-express/node_modules/postgres/cjs/src/connection.js:315:9)
at Socket.emit (node:events:514:28)
at addChunk (node:internal/streams/readable:324:12)
at readableAddChunk (node:internal/streams/readable:297:9)
at Readable.push (node:internal/streams/readable:234:10)
at TCP.onStreamRead (node:internal/stream_base_commons:190:23) {
severity_local: 'ERROR',
severity: 'ERROR',
code: '22P02',
where: "unnamed portal parameter $1 = '...'",
file: 'numutils.c',
line: '879',
routine: 'pg_strtoint64_safe'
PostgresError: invalid input syntax for type bigint: "newest"
at ErrorResponse (/Users/svalencia/projects/svalencia014/zjx-express/node_modules/postgres/cjs/src/connection.js:790:26)
at handle (/Users/svalencia/projects/svalencia014/zjx-express/node_modules/postgres/cjs/src/connection.js:476:6)
at Socket.data (/Users/svalencia/projects/svalencia014/zjx-express/node_modules/postgres/cjs/src/connection.js:315:9)
at Socket.emit (node:events:514:28)
at addChunk (node:internal/streams/readable:324:12)
at readableAddChunk (node:internal/streams/readable:297:9)
at Readable.push (node:internal/streams/readable:234:10)
at TCP.onStreamRead (node:internal/stream_base_commons:190:23) {
severity_local: 'ERROR',
severity: 'ERROR',
code: '22P02',
where: "unnamed portal parameter $1 = '...'",
file: 'numutils.c',
line: '879',
routine: 'pg_strtoint64_safe'
3 replies