Skip site navigation (1) Skip section navigation (2)

Re: Large Objects

From: "Frank D(dot) Engel, Jr(dot)" <fde101(at)fjrhome(dot)net>
To: pgsql general list <pgsql-general(at)postgresql(dot)org>
Subject: Re: Large Objects
Date: 2004-12-31 15:57:11
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general
Hash: SHA1

I'd advise use of BYTEA as well.  It's much simpler to work with than 
the OIDs, and has simpler semantics.  You do need to escape data before 
handing it to the query string, and handle escaped results (see the 
docs), but overall much nicer than working with OIDs.

On Dec 31, 2004, at 1:21 AM, Bruno Wolff III wrote:

> On Mon, Dec 27, 2004 at 10:39:48 -0600,
>   Dan Boitnott <dan(at)mcneese(dot)edu> wrote:
>> I need to do some investigation into the way Postgres handles large
>> objects for a major project involving large objects.  My questions 
>> are:
> I don't know the answer to all of your questions.
>>    * Is it practical/desirable to store files MIME-Encoded inside a
>> text field?
> This should be possible if the files aren't too large. bytea is 
> another type
> that might be better to use.
>>       * The obvious disadvantages:
>>          * slow, Slow, SLOW
> If you always need to access the whole file this might not be too bad.
> But if you only need to access a small part, you are going to pay a big
> cost as the whole record will need to be retrieved before you can pick
> out the part you want.
>>          * significant increase in per-file storage requirements
> It might not be too bad as large records can be compressed. That 
> should get
> back some of the bloat from uuencoding.
> ---------------------------(end of 
> broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose an index scan if 
> your
>       joining column's datatypes do not match
- -----------------------------------------------------------
Frank D. Engel, Jr.  <fde101(at)fjrhome(dot)net>

$ ln -s /usr/share/kjvbible /usr/manual
$ true | cat /usr/manual | grep "John 3:16"
John 3:16 For God so loved the world, that he gave his only begotten 
Son, that whosoever believeth in him should not perish, but have 
everlasting life.
Version: GnuPG v1.2.4 (Darwin)


$0 Web Hosting with up to 120MB web space, 1000 MB Transfer
10 Personalized POP and Web E-mail Accounts, and much more.
Signup at

In response to


pgsql-general by date

Next:From: Jaime CasanovaDate: 2004-12-31 16:07:29
Subject: Re: [PATCHES] reqd patch
Previous:From: Pierre-Frédéric CaillaudDate: 2004-12-31 14:59:04
Subject: Re: Can't change password?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group