すべてのプロダクト
Search
ドキュメントセンター

ApsaraDB RDS:ST_ForeignTables

最終更新日:Mar 29, 2026

外部データソース内のテーブルの名前と ID を照会します。

構文

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

パラメーター

パラメーター説明

source

テーブルを含むデータソースです。詳細については、「オブジェクトストレージのパス」をご参照ください。

driver

データソースにアクセスするために使用するドライバーです。「ST_FDWDrivers」をご参照ください。指定しない場合、デフォルトのドライバーが使用されます。

id

テーブルの ID です。

table_name

テーブルの名前です。

  • デフォルトのドライバーを使用する

    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
  • 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