Antananarivo, Madagascar - May 3, 2025

## PostgreSQL external file access extension

The external_file extension allows access to "external files" from PostgreSQL 
server file systems.

This extension adds the same functionalities given by the Oracle's BFILE data 
type that stores unstructured binary data in flat files outside the database. A 
BFILE column stores a file locator that points to an external file containing 
the data: (DIRECTORY, FILENAME). Here the data type is called EFILE.

The extension implements the following functions:

- **efilename(directory in name, filename in varchar(256))**: returns an EFILE 
data type that is referencing the external file on the server filesystem. 
Returns NULL on null imput.
- **readEfile(e_file in efile)**: copy the external file into a bytea.
- **writeEfile(buffer in bytea, e_file in efile)**: copy a bytea into a 
external file.
- **copyEfile(src in efile, dest in efile)**: duplicate file defined by src 
into file dest.
- **getEfilePath(e_file efile, need_read in boolean, need_write in boolean)**: 
giving an efile and booleans, one for read and one for write need, return the 
full path for the file.

Complete list of changes is available 
[here](https://github.com/darold/external_file/releases/tag/v1.2)

## Links

* Download:  
[https://github.com/darold/external_file/releases/](https://github.com/darold/external_file/releases/)
* Support: use GitHub report tool at 
[https://github.com/darold/external_file/issues](https://github.com/darold/external_file/issues)
* Documentation: 
[https://github.com/darold/external_file#readme](https://github.com/darold/external_file#readme)

## About external_file

The external_file extension is an open project under the PostgreSQL license as 
part of the improvement of Ora2Pg.
This is an original work of Dominique Legendre, improved and maintained by 
Gilles Darold at [HexaCluster Corp](https://hexacluster.ai/contact-us/).
Any contribution to build a better tool is welcome. You can send your ideas, 
features requests or
patches using the GitHub tools.

Reply via email to