error: there is no parameter $1 - Mailing list pgsql-novice

From Kinnard Hockenhull
Subject error: there is no parameter $1
Date
Msg-id CADxWJUr6t9na-eA-e_GtsLtb=os5MZkcu5FpRwoDw0MJ7TFduw@mail.gmail.com
Whole thread Raw
Responses Re: error: there is no parameter $1  (David Johnston <polobo@yahoo.com>)
List pgsql-novice
I get "error: there is no parameter $1" when I try to run this code using the node-postgres client:

client = pg.connect(connectionString, function(err, client, done){
    if(err) console.log(err);
    client.query('INSERT INTO causes (cause_name, goal, organization, sponsor, submitter) VALUES ($1,$2,$3,$4,$5)', r, function(err){
      console.log('This is r' + r)
      if (err) console.log(err);
    });    
  });

Any advice?

PS:
This is the full error statement:
{ [error: there is no parameter $1]
  name: 'error',
  length: 87,
  severity: 'ERROR',
  code: '42P02',
  detail: undefined,
  hint: undefined,
  position: '81',
  internalPosition: undefined,
  internalQuery: undefined,
  where: undefined,
  file: 'parse_expr.c',
  line: '812',
  routine: 'transformParamRef' }

--
All the best,
Kinnard Hockenhull
Founder + CEO,

**********************************************************
Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues

pgsql-novice by date:

Previous
From: Payal Singh
Date:
Subject: Re: How to Monitor backups
Next
From: David Johnston
Date:
Subject: Re: error: there is no parameter $1