BFILE type v17
Name | Native | Alias | Description |
---|---|---|---|
BFILE | ✅ | Data type used to store data objects stored in operating system files outside the database tablespaces |
Overview
The BFILE data type is used for data objects stored outside the database tablespaces in files accessed through the operating system. The BFILE column holds a reference to an operating system file.
Use this function to initialize a BFILE locator: BFILENAME(DIRECTORY, FILENAME)
.
The BFILE data type stores binary large objects (BLOBs) in external files. This type of datatype differs from the BLOB datatype because BLOB data is stored in the database while BFILE data is stored outside the database in a filesystem.
A BFILE column stores a reference to an external binary file, and you can use it to store images, audio, video, or other binary data. The actual data is stored outside the database in a filesystem and is accessed using a filename. This means that the BFILE column contains a file locator that points to the actual binary data stored in the filesystem.
When defining BFILEs, administrators must ensure that:
- The physical directory path exists.
- The directory path remains available and read permission remains enabled for database users.
The BFILENAME()
function doesn't verify that the directory and path name you specify exist. You can use the sanity-checking functions to verify that a BFILE
exists and to extract the directory and filenames from a BFILE
locator.
Maximum BFILEs per session
The max_bfiles_per_session
GUC limits the maximum number of BFILEs that can be open simultaneously. By default, that limit is set to 10.
If you change the value of max_bfiles_per_session
, you must restart the database server.
- On this page
- Overview