Re: Retrieve large objects from file system

Laurenz Albe <[email protected]>
Newsgroups gmane.comp.db.postgresql.novice
Organization Cybertec
Message-ID <[email protected]>
Vitaly Larchenkov wrote:
> I need to store pretty large (2-3 Gb) files in database.
> Is it possible to store column values (my blobs) in directory and access them with sql queries?

Not directly, no.

> I found “file_fdw" but it works with sources that suitable for COPY FROM, but i want to have
> few regular columns like “date_added”, “version” and “object” which values  points to file in
> directory with objects.

You'd have to use Large Objects for that: https://www.postgresql.org/docs/current/largeobjects.html

But it is usually faster and better to leave large files like that on the file system,
access them from the client side and store their location in the database.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.