Re: Column storage (EXTERNAL/EXTENDED) settings for bytea/text column

From: Joel Stevenson <jstevenson(at)bepress(dot)com>
To: Noah Misch <noah(at)leadboat(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Column storage (EXTERNAL/EXTENDED) settings for bytea/text column
Date: 2011-04-27 15:52:49
Message-ID: 48F3046A-3DA9-406A-B3AA-02952B7E9355@bepress.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 bytea value 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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Erwin Brandstetter 2011-04-27 15:53:36 timestamp(0) vs. timestamp
Previous Message Thomas Harold 2011-04-27 15:42:14 Re: PHP and PostgreSQL 9.0, pg_connect fails to connect