Consulta os nomes e IDs das tabelas em uma fonte de dados externa.
Sintaxe
setof record ST_ForeignTables(cstring source,
cstring driver default '',
out integer id,
out cstring table_name);
Parâmetros
|
Parâmetro |
Descrição |
|
source |
A fonte de dados que contém as tabelas. Para mais informações, consulte Object storage paths. |
|
driver |
O driver usado para acessar a fonte de dados. Para mais informações, consulte ST_FDWDrivers. Se não especificado, o sistema usa o driver padrão. |
|
id |
O ID da tabela. |
|
table_name |
O nome da tabela. |
Exemplos
-
Uso do driver padrão
SELECT table_name FROM (select (ST_ForeignTables('OSS://<access_id>:<secrect_key>@[<Endpoint>]/<bucket>/path_to/file')).*) table_test ORDER BY table_name::text ASC; ----------------- poi road county -
Uso do driver ESRI Shapefile
SELECT table_name FROM (select (ST_ForeignTables('OSS://<access_id>:<secrect_key>@[<Endpoint>]/<bucket>/path_to/file', 'ESRI Shapefile')).*) table_test ORDER BY table_name::text ASC; ----------------- poi road