文档

ST_ForeignTables

更新时间:

查询外部数据源中表的名称。

语法

setof record ST_ForeignTables(cstring source,
                              cstring driver default '',
                              out integer id,
                              out cstring table_name);

参数

参数名称

描述

source

数据源,参见对象存储服务路径

driver

使用的数据源驱动程序,可以通过ST_FDWDrivers函数获得。如果传入空字符串,则表示使用默认的驱动尝试访问。

id

表名序号。

table_name

表名称。

示例

  • 使用默认的驱动

    SELECT
           table_name
    FROM
         (select (ST_ForeignTables('OSS://<ak_id>:<ak_secret>@<endpoint>/data')).*) table_test
    ORDER BY table_name::text ASC;
    
     -----------------
     poi
     road
     county
  • 使用Esri Shapefile驱动

    SELECT
        table_name
    FROM
        (select (ST_ForeignTables('OSS://<ak_id>:<ak_secret>@<endpoint>/data', 'ESRI Shapefile')).*) table_test
    ORDER BY table_name::text ASC;
    
     -----------------
     poi
     road
  • 本页导读 (1)
文档反馈