[EN]
The node displays information about created third-party servers in the PostgreSQL database, as well as detailed information about them
select oid,
srvname,
srvtype,
srvversion,
srvacl::text,
srvoptions::text
from pg_catalog.pg_foreign_server
Node WRAPPER
Information about the extension used to work with a third-party server
select w.oid,
w.fdwname,
(select u.usename from pg_catalog.pg_user u where u.usesysid = w.fdwowner) "owner",
(select p.proname from pg_catalog.pg_proc p where p.oid = w.fdwhandler) "proc",
(select p.proname from pg_catalog.pg_proc p where p.oid = w.fdwvalidator) "validator",
w.fdwacl::text,
w.fdwoptions::text
from pg_catalog.pg_foreign_data_wrapper w,
pg_catalog.pg_foreign_server s
where s.oid = $$OIDFOREIGN
and s.srvfdw = w.oid
Node TABLE
Tables using a selected third-party server to display data from a remote database
SELECT (select (select n.nspname
from pg_catalog.pg_namespace n
where n.oid = c.relnamespace )||'.'||relname
from pg_catalog.pg_class c
where c.oid = f.ftrelid ) "table_name",
ftrelid,
ftserver,
ftoptions::text
FROM pg_foreign_table f
where ftserver = $$OIDFOREIGN
MAPPING
Login/password of the user of the third-party database under which the connection is made
SELECT oid,
umuser,
umserver,
umoptions::text
FROM pg_user_mapping
where umserver = $$OIDFOREIGN
[RU]
Узел отображает информацию о созданных сторонних серверах в базе данных PostgreSQL, а так же подробную информацию о них
select oid,
srvname,
srvtype,
srvversion,
srvacl::text,
srvoptions::text
from pg_catalog.pg_foreign_server
Узел WRAPPER
Информация о расширении используемом для работы со сторонним сервером
select w.oid,
w.fdwname,
(select u.usename from pg_catalog.pg_user u where u.usesysid = w.fdwowner) "owner",
(select p.proname from pg_catalog.pg_proc p where p.oid = w.fdwhandler) "proc",
(select p.proname from pg_catalog.pg_proc p where p.oid = w.fdwvalidator) "validator",
w.fdwacl::text,
w.fdwoptions::text
from pg_catalog.pg_foreign_data_wrapper w,
pg_catalog.pg_foreign_server s
where s.oid = $$OIDFOREIGN
and s.srvfdw = w.oid
Узел TABLE
Таблицы использующие выбранный сторонний сервер для отображения данных из удаленной БД
SELECT (select (select n.nspname
from pg_catalog.pg_namespace n
where n.oid = c.relnamespace )||'.'||relname
from pg_catalog.pg_class c
where c.oid = f.ftrelid ) "table_name",
ftrelid,
ftserver,
ftoptions::text
FROM pg_foreign_table f
where ftserver = $$OIDFOREIGN
MAPPING
Логин/пароль пользователя сторонней БД под которыми выполняется подключение
SELECT oid,
umuser,
umserver,
umoptions::text
FROM pg_user_mapping
where umserver = $$OIDFOREIGN