All Products
Search
Document Center

ApsaraDB RDS:ST_FDWDrivers

Last Updated:Mar 28, 2026

ST_FDWDrivers returns a list of drivers supported by the Ganos_FDW (foreign data wrapper) extension. Use the results to identify available data format drivers and retrieve their open_options values for use in a CREATE SERVER statement.

Syntax

setof record ST_FDWDrivers(out integer id,
              out text driver_name,
              out text open_options);

Parameters

ParameterDescription
idThe driver ID.
driver_nameThe driver name.
open_optionsThe options available when opening a data source. Pass these values in the OPTIONS clause of a CREATE SERVER statement.

Examples

List all drivers

SELECT * FROM
  (SELECT (ST_FDWDrivers()).*) t;

Query a specific driver

Filter by driver_name to retrieve the open_options for a particular format:

SELECT * FROM
  (SELECT (ST_FDWDrivers()).*) table_test
WHERE driver_name = 'ESRI Shapefile';

Output:

 id |  driver_name   |         open_options
  4 | ESRI Shapefile | <OpenOptionList>  <Option name='ENCODING' type='string' description='to override the encoding interpretation of the DBF with any encoding supported by CPLRecode or to "" to avoid any recoding'/>  <Option name='DBF_DATE_LAST_UPDATE' type='string' description='Modification date to write in DBF header with YYYY-MM-DD format'/>  <Option name='ADJUST_TYPE' type='boolean' description='Whether to read whole .dbf to adjust Real->Integer/Integer64 or Integer64->Integer field types if possible' default='NO'/>  <Option name='ADJUST_GEOM_TYPE' type='string-select' description='Whether and how to adjust layer geometry type from actual shapes' default='FIRST_SHAPE'>    <Value>NO</Value>    <Value>FIRST_SHAPE</Value>    <Value>ALL_SHAPES</Value>  </Option>  <Option name='AUTO_REPACK' type='boolean' description='Whether the shapefile should be automatically repacked when needed' default='YES'/>  <Option name='DBF_EOF_CHAR' type='boolean' description='Whether to write the 0x1A end-of-file character in DBF files' default='YES'/></OpenOptionList>
(1 row)

The open_options column returns an XML string. The key options for the ESRI Shapefile driver are:

OptionTypeDefaultDescription
ENCODINGstringOverrides the encoding interpretation of the DBF file. Set to "" to skip recoding.
DBF_DATE_LAST_UPDATEstringModification date written to the DBF header, in YYYY-MM-DD format.
ADJUST_TYPEbooleanNOReads the entire .dbf to adjust field types (for example, Real to Integer) when possible.
ADJUST_GEOM_TYPEstring-selectFIRST_SHAPEDetermines how the layer geometry type is computed. Valid values: NO, FIRST_SHAPE, ALL_SHAPES.
AUTO_REPACKbooleanYESAutomatically repacks the shapefile when needed.
DBF_EOF_CHARbooleanYESWrites the 0x1A end-of-file character in DBF files.