Node-postgres is a postgresql client module for node.js applications to interact with postgresql databases.

learn more… | top users | synonyms

2
votes
2answers
443 views

What kind of object is node-postgres Error? Why node's console.log and JSON.stringify handle it differently?

console.log outputs it like this, { [error: syntax error at or near "step"] length: 86, name: 'error', severity: 'ERROR', code: '42601', detail: undefined, hint: undefined, position: ...
0
votes
2answers
304 views

Use node-postgres to get Postgres “timestamp without timezone” in utc

I've got some timestamps stored as the Postgres type timestamp without time zone. I'll use the timestamp 2013-12-20 20:45:27 as an example. I'm intending that this represent a UTC timestamp. In ...
1
vote
1answer
75 views

NPM alias node-postgres to node-postgres-pure

I'm building a nodejs application that needs to run on a Windows server. I've managed to get almost everything working, but I've ran into a problem with the postgresql driver. BrianC has a pure ...
0
votes
1answer
379 views

Unable to install the node-postgres node.js module

Please, observe: c:\Work\if\server>npm install pg npm WARN package.json [email protected] No README data npm WARN package.json [email protected] No README data npm http GET ...
0
votes
1answer
83 views

Is it possible to set postgres search_path in node-postgres?

I'm moving an application from RoR to Express.js. ActiveRecord postgres adapter has the search_path configuration option. Is it possible to set the search_path for the Client ?
1
vote
0answers
127 views

Node-Postgres query method not calling its callback function

I have the following code which uses node-postgres: var client = new pg.Client(conString); client.connect(function(err) { if(err) { throw new Error(console.error('could ...
1
vote
0answers
58 views

Can't access postgres database, query doesn't seem to work

var client = new pg.Client(clientConfig); var queryConfig = {text: 'SELECT messageID FROM privateMessages WHERE message = $1', values: ['test']}; var server = ...
1
vote
0answers
82 views

pg doesn't seem to close the connection correctly

I am writing an application using Node.js and postgresql. When a user authenticates it hits the DB to check the user's password then supposedly closes the connection to the DB. However, if the user ...
0
votes
0answers
39 views

krakenjs and node postgres

How do I set up node-postgres using krakenjs? I want to take advantage of node-postgres's connection pooling which requires the client and done parameters. I guess I could set them using global ...
0
votes
0answers
23 views

Parameterized queries with postGIS?

I am trying to use parameterized queries (node-postgres) with postGIS. The error message returned by the query reads "error: bind message supplies 2 parameters, but prepared statement "" requires 0" ...
0
votes
0answers
71 views

SSL for PostgreSQL connection nodejs

I am trying to connect to my Heroku PostgreSQL DB and I keep getting an SSL error. Does anyone have an idea on how to enable SSL in the connection string? postgres://user:pass@host:port/database; ...
0
votes
0answers
74 views

socket.io { [Error: read ETIMEDOUT] code: 'ETIMEDOUT', errno: 'ETIMEDOUT', syscall: 'read' }

Recently I had an error with my socket.io webserver. When I connected through socket.io everything was fine and I got data out of my MySQL database using node-mysql. But when I refreshed my page after ...
0
votes
0answers
79 views

nodejs synchronous pg query without callback

read 15 topics about synchronous calls, installed 2 modules. (Step,Seq) but nothing work how i can call loadTranslation and wait answer to the variable? module.exports.loadTranslation = ...
0
votes
0answers
48 views

Execute Statement using one value of query array

I am attempting to execute a query using a prepared array. The array has two elements but this query uses only one of them. I am using node-postgres. Array: var g=[]; g.push(email,password); ...
0
votes
0answers
56 views

Listen query is not working in node-postgres

My table in postgresql CREATE TABLE emp3 ( empname text, salary integer, last_user text ); Function CREATE FUNCTION check_emp_record() RETURNS trigger AS $emp_stamp$ BEGIN NOTIFY ...
0
votes
0answers
57 views

how to convert node-restify req.param into json to manipulate

when using node-restify with an ajax form post log.console(req.param) => obj (not json) how can I modify the req.param data to insert into postgres (ie I want to use an if statement and convert an ...
0
votes
0answers
269 views

Getting invalid frontend message type 0 in node-postgres

I am making an app using node.js and postgresql. My code that worked fine only minutes ago is suddenly throwing an error. I do not understand because the same code worked earlier. I cannot interact ...
0
votes
0answers
350 views

Postgresql query problems for nodejs

I am making an app with node.js, using the express framwork, woth postgresql as my database. I have to insert some values into my database, and some of them have quotes. e.g. Tony's Seafood ...
-1
votes
0answers
148 views

angularJS + expressJS + node-postgres routing/connection issue

I'm trying to get a login function working in angularJS+expressJS+node-postgres. I have my front-end http-server running on port 8000, expressJS running on port 3000 and my postgres server running on ...