pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Doug McNaught <doug@mcnaught.org>
To: Rick Gigger <rick@alpinenetworking.com>
Cc: PgSQL General ML <pgsql-general@postgresql.org>
Subject: Re: uploading files
Date: 18 Nov 2003 14:24:28 -0500
Message-ID: <87llqdqy37.fsf@asmodeus.mcnaught.org> (raw)
References: <1069164075.986.239.camel@bbking.uio.no>
	<20031118142919.GI4953@libertyrms.info>
	<1069180780.2769.91.camel@haggis.homelan>
	<019301c3ae07$d714e220$0700a8c0@trogdor>

"Rick Gigger" <rick@alpinenetworking.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



view thread (10+ messages)  latest in thread

Message-ID: <87llqdqy37.fsf@asmodeus.mcnaught.org>
Permalink:  ../87llqdqy37.fsf@asmodeus.mcnaught.org/
Also on:    postgresql.org/message-id/87llqdqy37.fsf@asmodeus.mcnaught.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: doug@mcnaught.org, rick@alpinenetworking.com, pgsql-general@postgresql.org
  Subject: Re: uploading files
  In-Reply-To: <87llqdqy37.fsf@asmodeus.mcnaught.org>
  References: <1069164075.986.239.camel@bbking.uio.no> <20031118142919.GI4953@libertyrms.info> <1069180780.2769.91.camel@haggis.homelan> <019301c3ae07$d714e220$0700a8c0@trogdor> <87llqdqy37.fsf@asmodeus.mcnaught.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox