Re: Selecting large objects stored as bytea - Mailing list pgsql-general

From Tomasz Ostrowski
Subject Re: Selecting large objects stored as bytea
Date
Msg-id 20080222195907.GA10814@batory.org.pl
Whole thread Raw
In response to Re: Selecting large objects stored as bytea  ("Daniel Verite" <daniel@manitou-mail.org>)
List pgsql-general
On Fri, 22 Feb 2008, Daniel Verite wrote:

> You could use the function below that breaks a bytea value into
> pieces of 'chunksize' length and returns them as a set of rows.

When you do this then make sure that this column has external
storage:
    alter column [column_name] set storage external;
Then getting this chunks will be fast.

But be aware that external storage does not compress data, so you
would need more space for database if your data is compressible. Also
you'd need to dump, truncate and restore this table, as storage
option is only honored for new rows. Maybe just "cluster
[table_name]" will do, I don't know.

Regards
Tometzky
--
...although Eating Honey was a very good thing to do, there was a
moment just before you began to eat it which was better than when you
were...
                                                      Winnie the Pooh

pgsql-general by date:

Previous
From: "scotty@linuxtime.it"
Date:
Subject: Re: Function problem
Next
From: "Andrej Ricnik-Bay"
Date:
Subject: Re: Understanding ps -ef "command" column