I wish to have connected more than 1 users at the same time, as follows:
// in node-postgres
const { Pool } = require('pg');
const pool_1 = new Pool({
user: 'dbuser_1',
host: 'database.server.com',
database: 'mydb',
password: 'secretpassword_1',
port: 3211,
});
const pool_2 = new Pool({
user: 'dbuser_2',
host: 'database.server.com',
database: 'mydb',
password: 'secretpassword_2',
port: 3211,
});
// in pg-promise
const initOptions = { ... };
const pgp = require('pg-promise')(initOptions);
const cn_1 = 'postgres://username_1:password_1@host:port/database';
const cn_2 = 'postgres://username_2:password_2@host:port/database';
const db_1 = pgp(cn_1);
const db_2 = pgp(cn_2);
dbuser_1
and dbuser_2
obviously have different privileges.
username_1
and username_2
obviously have different privileges, too.
Since I do not find any resource/info, (I suspect that all web projects in this tiny world use only single-user connection and multi-users connection apps, for some reason, are "strictly forbidden") I would like to ask if there are any known drawbacks?
Tia
PS: I apologize for combining the two projects in one question but I cannot wait for passing 90 minutes... Einstein and the limit of the universe! Βirdie hurts, then cut birdie! 30' minutes more... Tic, tac, tic, tac, tic tac... Fortunately, I am an engineer. Next time that I shall construct a car, I shall install an immobilizer, so as the driver to use it once every 90 minutes. Ha ha ha... Viva masturtyping!!! I am the inventor of the verb (masturtype) to describe the modern world and its derivatives (masturtyper, masturtypement, etc)! And for your encyclopedic information, I used them for first time in w3schools.com. I politely asked a question in the forum and I got a very impolite answer! Unfortunately, after this message the smart folks in SO will cancel my account, so I suspect it will take a long time to read from me again!!! Hasta la vista!