Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

394
Views
postgress-node error: bind message supplies 1 parameters, but prepared statement "" requires 0

I'm doing a simple request to a database and trying to retrieve all the table data. However, i get this error: error: bind message supplies 1 parameters, but prepared statement "" requires 0

const { Client } = require('pg');

const client = new Client({
    //connection details
});

const query = async() => {
    await client.connect();
    const result = await client.query("SELECT * FROM asites", [1]);
    console.log(result.rows);
    client.end();
}

query();

Any help is greatly appreciated.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

After SELECT why do you have that part: ", [1]"? This is probablty the error as you don't provide a bind in the statement.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!