Problema con dblink vs FWD

From: "Gilberto Castillo" <gilberto(dot)castillo(at)etecsa(dot)cu>
To: "Juan" <smalltalker(dot)marcelo(at)gmail(dot)com>
Cc: "Miguel Angel Hernandez Moreno" <miguel(dot)hdz(dot)mrn(at)gmail(dot)com>, "Aracelly Collazos" <aracelly(dot)ta(dot)c(at)gmail(dot)com>, "Lista PostgreSql" <pgsql-es-ayuda(at)postgresql(dot)org>
Subject: Problema con dblink vs FWD
Date: 2014-02-21 15:24:27
Message-ID: 52049.192.168.207.54.1392996267.squirrel@webmail.etecsa.cu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

> Gilbertos que es FWD ?

Juan,

Te dejo este ejemplo por si te interesa revisar:

CREATE EXTENSION postgres_fdw;

CREATE SERVER app_db
FOREIGN DATA WRAPPER postgres_fdw
OPTIONS (dbname 'test', host 'localhost');

CREATE USER MAPPING for current_user
SERVER app_db
OPTIONS (user 'postgres', password 'admin_db');

CREATE FOREIGN TABLE testtabla_f
(
id serial NOT NULL,
nombre character varying
)
SERVER app_db OPTIONS (table_name 'mitabla');

SELECT * FROM testtabla_f LIMIT 5;
UPDATE testtabla_f set nombre='Amaury' where id=2;
INSERT INTO testtabla_f (id, nombre) VALUES (3,'Felipe');

Una sutileza final, usted no está obligado a tener TODO las DB en
PostgreSQL 9.3, sólo uno que se pueda conectar con los demás, así que
adelante a probar :-)

Saludos,
Gilberto Castillo
La Habana, Cuba

Attachment Content-Type Size
unknown_filename text/plain 179 bytes
unknown_filename text/plain 157 bytes

In response to

Responses

  • FWD at 2014-02-21 16:11:26 from Javier Lugo Porras

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Lazaro Ruben Garcia Martinez 2014-02-21 15:58:52 RE: Problema con dblink
Previous Message Javier Lugo Porras 2014-02-21 15:13:18 Re: Problema con dblink