I'm trying to get Javascript to read/write to a PostgreSQL database. I found this project on github. I was able to get the following sample code to run in node.  var pg = require('pg'); //native libpq bindings = `var pg = require('p...
I'm trying to build a phonegap app for ios and android. It's been going well so far but now I hit a major obstacle and I need some help.  I need to connect to a remote Postgres database. I haven't done anything like that before.  Does any...
I want to use PostgreSQL  in the client side. is that possible? can i have this code?  in my server.js     var pg = require('pg');   in my client side       var conString = "postgres://postgres:[email protected]/mydb";      var client =...
I have a Damage table that has the following fields:   description date_of_damage   I'd like to add another field to store Damagepoints, which are JSON objects that look like this:  { top: 50, left: 100 }   Top and left are the coordinates of the...
I'm using Node package pg for postgres (here):  npm i pg  var pg = require('pg');   I'm querying a large cluster which is not owned by me, and under certain conditions may fail. Failure may be bad response which is easy to handle or e...
I'm trying to perform an update command with sequelize on rows in a postgres database. I need to be able to update multiple rows that have different conditions with the same value.  For example, assume I have a user table that contains the follow...
I was searching the documentation of pg-promise specifically in the creation of the client. But I wasn't able to find the option to set the default schema to be used in the connection, it always uses public schema. How do I set it?...
I have been struggling with Promises and would like to know how things work with Promises. In my project, I am using Bookshelfjs ORM for fetching the data from Postgres.  Here is the code that I am working on right now. I get an array of device ids i...
I have the following query that inserts data into a many-to-many join table  INSERT INTO playlist_genre(playlist_id, genre_id) VALUES  (${playlistId}, ${genre1Id}),         (${playlistId}, ${genre2Id}),         (${playlistId}, ${genre3Id}) );   Howev...
How could I deactivate the access to plv8 functions in my eval?  create or replace function js(src text, input json) returns json as $$   plv8.elog(NOTICE, 'test');   //--plv8 = null; // this would disable permanently plv8, also after another...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.