Pipelines reference - PGFS

This section provides reference documentation for EDB Postgres AI AI Accelerator Pipelines PGFS. It includes information on the functions and views available in the PGFS extension that gives aidb access to S3-compatible file systems and local file systems.

Functions

pgfs.create_foreign_table

Creates a foreign table in the database.

Parameters

ParameterTypeDefaultDescription
table_nametext
server_nametext

Example

SELECT pgfs.create_foreign_table('my_table', 'my_server');

pgfs.create_storage_location

Creates a storage location in the database.

Parameters

ParameterTypeDefaultDescription
nametextName for storage location
urltextURL for this storage location (prefix s3: or file:)
msl_iduuidUnused
optionsjson
credentialsjson

Example

SELECT pgfs.create_storage_location('my_storage', 's3://my_bucket', '123e4567-e89b-12d3-a456-426614174000', '{}', '{}');

pgfs.create_storage_location_with_foreign_table

Creates a storage location in the database and associates it with a foreign table.

Parameters

ParameterTypeDefaultDescription
storage_location_nametext
urltext
msl_iduuid
optionsjson
credentialsjson

Example

SELECT pgfs.create_storage_location_with_foreign_table('my_storage', 's3://my_bucket', '123e4567-e89b-12d3-a456-426614174000', '{}', '{}');

pgfs.delete_storage_location

Deletes a storage location from the database.

Parameters

ParameterTypeDefaultDescription
storage_location_nametext

Example

SELECT pgfs.delete_storage_location('my_storage');

pgfs.get_default_storage_location

Returns the default storage location.

Returns

ColumnTypeDescription
default_storage_locationtext

Example

SELECT * FROM pgfs.get_default_storage_location();

pgfs.get_storage_location

Returns information about a storage location.

Parameters

ParameterTypeDefaultDescription
storage_location_nametext

Returns

ColumnTypeDescription
nametext
urltext
msl_iduuid
optionsjson
credentialsjson

Example

SELECT * FROM pgfs.get_storage_location('my_storage');

pgfs.list_storage_locations

Lists all storage locations in the database.

Returns

ColumnTypeDescription
nametext
urltext
msl_iduuid
optionsjson
credentialsjson

Example

SELECT * FROM pgfs.list_storage_locations();

pgfs.set_default_storage_location

Sets the default storage location.

Parameters

ParameterTypeDefaultDescription
storage_location_nametext

Example

SELECT pgfs.set_default_storage_location('my_storage');

pgfs.update_storage_location

Updates a storage location in the database.

Parameters

ParameterTypeDefaultDescription
nametext
urltext
msl_iduuid
optionsjson
credentialsjson

Example

SELECT pgfs.update_storage_location('my_storage', 's3://my_bucket', '123e4567-e89b-12d3-a456-426614174000', '{}', '{}');

Views

There are no user-facing views in the pgfs schema.

Tables

There are no user-facing tables in the pgfs schema.


Could this page be better? Report a problem or suggest an addition!