Re: Retrieve large objects from file system

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Vitaly Larchenkov <vitaly(dot)larchenkov(at)gmail(dot)com>, pgsql-novice(at)postgresql(dot)org
Subject: Re: Retrieve large objects from file system
Date: 2018-11-09 11:57:16
Message-ID: bde8435d0728454991c5ba963df343d2c41a2998.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

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

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Mohammed Younus Siddiqui 2018-11-20 08:42:17 PG 9.4 ODBC Driver
Previous Message Vitaly Larchenkov 2018-11-09 11:49:53 Retrieve large objects from file system