February 2020
Intermediate to advanced
734 pages
38h 13m
English
For this recipe, we will perform all actions on the pg-report PostgreSQL server in the pgbench database. Follow these steps as the postgres user to create a table in pg-report that refers to a table on pg-primary within pgbench:
CREATE USER MAPPING FOR postgres
SERVER primary_db
OPTIONS (user 'postgres', password 'changeme');
DROP TABLE IF EXISTS pgbench_accounts;
CREATE FOREIGN TABLE pgbench_accounts ( aid INTEGER NOT NULL, bid INTEGER, abalance INTEGER, filler CHAR(84) ) SERVER primary_db OPTIONS (table_name ...
Read now
Unlock full access