Pipelines PGFS with local file storage

Note

This feature is available in EDB Postgres AI - AI Accelerator Pipelines. We recommend you use the functionality of the pgfs functions to configure a storage location.

PGFS uses the file: prefix to indicate a local file system. You can use the file: prefix to access files on the local file system.

Using local file storage through PGFS and SQL

For example:

CREATE SERVER images_local FOREIGN DATA WRAPPER pgfs OPTIONS (url 'file:///var/lib/edb/pipelines/images');

This command creates a server object called images_local that connects to the local file system at /var/lib/edb/pipelines/images.

You can then create a foreign table that is associated with the server:

CREATE FOREIGN TABLE images (id INT, name TEXT) SERVER images_local;

This foreign table is associated with the images_local server object and can be used to access the files in the /var/lib/edb/pipelines/images directory.

You can also use the file: prefix to access files on the local file system when you create a foreign table. For example:

CREATE FOREIGN TABLE images (id INT, name TEXT) SERVER images_local OPTIONS (filename 'file:///var/lib/edb/pipelines/images/image1.jpg');

This foreign table is associated with the images_local server object and can be used to access the file /var/lib/edb/pipelines/images/image1.jpg.


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