Re: Column storage (EXTERNAL/EXTENDED) settings for bytea/text column - Mailing list pgsql-general

From Joel Stevenson
Subject Re: Column storage (EXTERNAL/EXTENDED) settings for bytea/text column
Date
Msg-id 48F3046A-3DA9-406A-B3AA-02952B7E9355@bepress.com
Whole thread Raw
In response to Re: Column storage (EXTERNAL/EXTENDED) settings for bytea/text column  (Noah Misch <noah@leadboat.com>)
List pgsql-general
Thanks for the help with that, Noah.  Indeed the sizes do look like I'd expect them to if I force deflation of the
byteavalue before inserting it into the EXTENDED column.   

On Apr 21, 2011, at 2:02 PM, Noah Misch wrote:

> On Mon, Apr 11, 2011 at 03:19:23PM -0700, Joel Stevenson wrote:
>> create table obj1 ( object bytea );
>> create table obj2 ( object bytea );
>> alter table obj2 alter column object set storage external;
>> insert into obj1 ( object ) select object from serialized_content where id = 12345;
>> insert into obj2 ( object ) select object from obj1;
>
> If the value that shows up for insertion is already compressed, EXTERNAL storage
> will not decompress it.  Change this line to
>
>  insert into obj2 ( object ) select object || '' from obj1;
>
> to observe the effect you seek.
>
> Given the purpose of EXTERNAL storage, this might qualify as a bug.


pgsql-general by date:

Previous
From: Phoenix Kiula
Date:
Subject: Index not being used for UPDATE?
Next
From: Phoenix Kiula
Date:
Subject: NULL saves disk space?