Show linked servers in PostgreSQL
Asked Answered
S

3

5

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
Squamous answered 25/1, 2014 at 12:56 Comment(0)
R
7

You want the pg_foreign_server and pg_foreign_table views.

Rudman answered 25/1, 2014 at 14:4 Comment(1)
The pg_foreign_server and pg_foreign_table are very informative, especially for a new user like myself. This link was also very helpful: postgresql.org/docs/9.3/static/postgres-fdw.htmlSquamous
N
3
select * from information_schema._pg_foreign_servers;
Nippon answered 11/4, 2016 at 15:34 Comment(0)
C
1

You can also use the following commands in pgsql-client

  • \det+ - List of foreign tables
  • \des+ - List of foreign servers
Crunch answered 4/7, 2017 at 14:48 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.