Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Show linked servers in PostgreSQL

I used the below to create a link to an Oracle server from Postgresql. I see there are methods to alter and drop the server but I can not find a command that lists all available servers that have been created.

Is the information stored anywhere in postgresql? Where I can view it?

CREATE EXTENSION oracle_fdw;
CREATE SERVER oradb FOREIGN DATA WRAPPER oracle_fdw
like image 479
justZito Avatar asked Dec 26 '22 14:12

justZito


1 Answers

You want the pg_foreign_server and pg_foreign_table views.

  • http://www.postgresql.org/docs/current/static/catalog-pg-foreign-server.html
  • http://www.postgresql.org/docs/current/static/catalog-pg-foreign-table.html
like image 142
Craig Ringer Avatar answered Apr 26 '23 13:04

Craig Ringer