Top "Node-postgres" questions

Node-postgres is a postgresql client module for node.

Does pg (node-postgres) automatically sanitize data

I am using node-postgres for a production application and I am wondering if there is anything I should be concerned …

node.js pg node-postgres
Using Async/Await with node-postgres

I am using node-postgres to query my database and would like to know how to use async/await and handle …

node.js postgresql node-postgres
Node-postgres Inserting a new record into my database does not return the new entry's data

Here's the route from which the query is being executed: userRouter.route("/new") .post(function (req, res) { var user = req.…

javascript postgresql express node-postgres
Node.js / Express - How to get variables defined in app.js in routes/index.js?

I'm new to Node.js and Express. How can I access the variable created in "app.js" called "pg" in "…

node.js express node-postgres
Webpack can not use __dirname?

I am trying to use node-postgres to hook my app up to Postgres. The code I use is: import React …

node.js reactjs webpack node-postgres
Node-postgres: named parameters query (nodejs)

I used to name my parameters in my SQL query when preparing it for practical reasons like in php with …

sql node.js query-parameters node-postgres
How to set right date format for editable-date

I getting some date fileds from postgres with format like: "2000-11-30T14:00:00.000Z" I can't use this in my …

javascript angularjs date x-editable node-postgres
node-postgres: how to prepare a statement without executing the query?

I want to create a "prepared statement" in postgres using the node-postgres module. I want to create it without binding …

node.js node-postgres
How do I check if a table exists?

In db/index.js: const { Pool } = require('pg'); //node-postgres const pool = new Pool; module.exports = { query: (text, params, callback) => { …

node.js postgresql node-postgres
How do I use node-postgres in a server?

I'm writing a Node.js web server that uses a Postgres database. I used to connect on each new request …

node.js node-postgres