prepared statements on nodejs not working (with node-postgres)

I'm using nodejs 0.10.12 and the latest version of node-postgres module. I try to use prepared statements, I have something like

var query = client.query(  {text:"insert into controller(c_name) values($1)", values:[ja]});
//ja is a var that contains user input came from the client side

query.on("error", function (error) {
console.log(error)});

query.on("end", function (result) {
console.log(result), client.end()});

And I get the following

{[error: permission denied for relation controller]
length: 116,
name: 'error',
severity: 'ERROR',
code: '42501',
detail: undefined,
hint: undefined,
position: undefined,
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
file: '.\\src\\backend\\catalog\\aclchk.c',
line: '3166',
routine: 'aclcheck_error'}
undefined

I admit I am a newcomer to node and that module, so I have no idea how to fix this. Any suggestions/hints?

Thank you very much

Is incoming string bigger than c_name length?

length: 116,

Secondly you see code: '42501', that should be error code, that you should search for in node-postgres project documentation or sources.