Re: uploading files

From: Doug McNaught <doug(at)mcnaught(dot)org>
To: "Rick Gigger" <rick(at)alpinenetworking(dot)com>
Cc: "PgSQL General ML" <pgsql-general(at)postgresql(dot)org>
Subject: Re: uploading files
Date: 2003-11-18 19:24:28
Message-ID: 87llqdqy37.fsf@asmodeus.mcnaught.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general

"Rick Gigger" <rick(at)alpinenetworking(dot)com> writes:

> What is the best method for storing files in postgres? Is it better to use
> the large object functions or to just encode the data and store it in a
> regular text or data field?

Depends on whether you need "random access" to the contents. You can
lo_seek() inside a large object and retrieve parts of the data with
lo_read(), while 'text' and 'bytea' currently require fetching the
whole field.

-Doug

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Keith C. Perry 2003-11-18 19:25:01 Re: uploading files
Previous Message Gaetano Mendola 2003-11-18 19:15:37 Oracle -> Postgres migration stories

Browse pgsql-general by date

  From Date Subject
Next Message Keith C. Perry 2003-11-18 19:25:01 Re: uploading files
Previous Message Andrew Sullivan 2003-11-18 19:15:09 Re: Point-in-time data recovery - v.7.4