Dblink postgres

From UVOO Tech Wiki
Revision as of 16:38, 2 April 2023 by Busk (talk | contribs)
Jump to navigation Jump to search

https://dbaclass.com/article/how-to-create-database-link-in-postgres/

create users in function via dblink

create role tester1 with superuser login password 'tester1';
create database tester1 owner tester1;
dblink_connect('hostaddr=127.0.0.1 port=5432 dbname=tester1 user=tester1 password=tester1');

CREATE USER dblinkuser WITH PASSWORD 'dblinkuser';