Pipelines PGFS reference#
This reference documentation for EDB Postgres AI - AI Accelerator Pipelines PGFS includes information on the functions and views available in the Pipelines PGFS reference extension. These functions give AIDB access to S3-compatible file systems, Google Cloud Storage buckets, and local file systems.
pgfs#
Functions#
Functions#
pgfs.create_foreign_table#
Creates a foreign table in the database.
Parameters#
Parameter |
Type |
Default |
Description |
|---|---|---|---|
table_name |
text |
||
server_name |
text |
Example#
SELECT pgfs.create_foreign_table(my_table, my_server);
pgfs.create_storage_location#
Creates a storage location in the database.
Parameters#
Parameter |
Type |
Default |
Description |
|---|---|---|---|
name |
text |
Name for storage location |
|
url |
text |
URL for this storage location (prefix s3:, gs:, or file:) |
|
options |
json |
Options for the storage location (optional) |
|
credentials |
json |
Credentials for the storage location (optional) |
OR
Parameter |
Type |
Default |
Description |
|---|---|---|---|
name |
text |
Name for storage location |
|
url |
text |
URL for this storage location (prefix s3:, gs:, or file:) |
|
msl_id |
uuid |
Unused |
|
options |
json |
Options for the storage location (optional) |
|
credentials |
json |
Credentials for the storage location (optional) |
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#
Parameter |
Type |
Default |
Description |
|---|---|---|---|
storage_location_name |
text |
Name for storage location |
|
url |
text |
URL for this storage location (prefix s3:, gs: or file:) |
|
options |
json |
Options for the storage location (optional) |
|
credentials |
json |
Credentials for the storage location (optional) |
OR
Parameter |
Type |
Default |
Description |
|---|---|---|---|
storage_location_name |
text |
Name for storage location |
|
url |
text |
URL for this storage location (prefix s3:, gs: or file:) |
|
msl_id |
uuid |
Unused |
|
options |
json |
Options for the storage location (optional) |
|
credentials |
json |
Credentials for the storage location (optional) |
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#
Parameter |
Type |
Default |
Description |
|---|---|---|---|
storage_location_name |
text |
Name of storage location |
Example#
SELECT pgfs.delete_storage_location(my_storage);
pgfs.get_default_storage_location#
Returns the default storage location.
Returns#
Column |
Type |
Description |
|---|---|---|
default_storage_location |
text |
Example#
SELECT * FROM pgfs.get_default_storage_location();
pgfs.get_storage_location#
Returns information about a storage location.
Parameters#
Parameter |
Type |
Default |
Description |
|---|---|---|---|
storage_location_name |
text |
Name of storage location |
Returns#
Column |
Type |
Description |
|---|---|---|
name |
text |
|
url |
text |
|
msl_id |
uuid |
|
options |
json |
|
credentials |
json |
Example#
SELECT * FROM pgfs.get_storage_location(my_storage);
pgfs.list_storage_locations#
Lists all storage locations in the database.
Returns#
Column |
Type |
Description |
|---|---|---|
name |
text |
|
url |
text |
|
msl_id |
uuid |
|
options |
json |
|
credentials |
json |
Example#
SELECT * FROM pgfs.list_storage_locations();
pgfs.set_default_storage_location#
Sets the default storage location.
Parameters#
Parameter |
Type |
Default |
Description |
|---|---|---|---|
storage_location_name |
text |
Example#
SELECT pgfs.set_default_storage_location(my_storage);
pgfs.update_storage_location#
Updates a storage location in the database.
Parameters#
Parameter |
Type |
Default |
Description |
|---|---|---|---|
name |
text |
||
url |
text |
||
msl_id |
uuid |
||
options |
json |
||
credentials |
json |
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.