Bom dia pessoal
Estou tentando implementar a rotina no sistema mas deparai com o seguinte problema:
dbamc001 - servidor1
dbamc001 - servidor2

tabela cidade
como diferenciar a tabela do servidor1 um para o servidor2

CREATE EXTENSION hstore;
CREATE EXTENSION postgres_fdw;

CREATE SERVER fdwamc001 FOREIGN DATA WRAPPER postgres_fdw OPTIONS (host 'amcsistema.ddns.com.br', dbname 'dbamc001', port '5432'); CREATE USER MAPPING FOR amcsistema SERVER fdwamc001 OPTIONS (user 'amcsistema', password 'amc@31200676');

CREATE FOREIGN TABLE cidade2 (codigo INTEGER, nome VARCHAR(30) NOT NULL) SERVER fdwamc001;

select * from cidade2


ERROR:  relation "public.cidade2" does not exist
CONTEXT:  Remote SQL command: SELECT codigo, nome FROM public.cidade2
(execution time: 437 ms; total time: 437 ms)

<<attachment: cgcesarsoares.vcf>>

_______________________________________________
pgbr-geral mailing list
[email protected]
https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral

Responder a