Re: more than 2GB data string save - Mailing list pgsql-general

From Steve Atkins
Subject Re: more than 2GB data string save
Date
Msg-id A381E230-272F-432B-A2FB-FAAD3DBD8D07@blighty.com
Whole thread Raw
In response to Re: more than 2GB data string save  (Scott Marlowe <scott.marlowe@gmail.com>)
Responses Re: more than 2GB data string save
Re: more than 2GB data string save
List pgsql-general
On Feb 9, 2010, at 9:52 PM, Scott Marlowe wrote:

> On Tue, Feb 9, 2010 at 9:38 PM, AI Rumman <rummandba@gmail.com> wrote:
>> How to save 2 GB or more text string in Postgresql?
>> Which data type should I use?
>
> If you have to you can use either the lo interface, or you can use
> bytea.  Large Object (i.e. lo) allows for access much like fopen /
> fseek  etc in C, but the actual data are not stored in a row with
> other data, but alone in the lo space.  Bytea is a legit type that you
> can have as one of many in a row, but you retrieve the whole thing at
> once when you get the row.

Bytea definitely won't handle more than 1 GB. I don't think the lo interface
will handle more than 2GB.

>
> Preferred way to store 2GB data is to put it into a file and put the
> name of the file into the database.


This.

Cheers,
  Steve


pgsql-general by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: more than 2GB data string save
Next
From: Scott Marlowe
Date:
Subject: Re: more than 2GB data string save