1

I've one problem regarding manage information from two different Postgres servers.

  • In the one server I've one table a containing id bigserial and phone varchar(200)
  • On the other server I've table b that contains id bigserial and tell varchar(200)

Is there a way that I can compare witch rows from table a are present in the rows of table b, comparing by phone = tell?

Julian
  • 375
  • 1
  • 8
  • 23
  • Thank you, it might help, but I've no access to the management of the servers, and this dblink function is not installed. After I manage to install it, I'll be able to tell you if this is helpful for me. :) – Julian Jul 02 '13 at 12:55
  • Glad your up and running :-) Please consider upvoting (and accepting) both the answer below, and the answer on the linked post to help other users in the future. – Robert H Jul 02 '13 at 13:25

1 Answers1

0

You can use dblink to fetch data from remote server. Once you have a cursor open you can treat data from dblink_fetch as data returned from local table and just outer join it with the local table. If there are many rows in the remote table you might want to use pl/pgSQL to fetch it in parts.

Jakub Kania
  • 15,665
  • 2
  • 37
  • 47