Re: cast bytea to double precision[] - Mailing list pgsql-novice

From Mathieu Dubois
Subject Re: cast bytea to double precision[]
Date
Msg-id 4E2FD523.6010400@limsi.fr
Whole thread Raw
In response to Re: cast bytea to double precision[]  (Merlin Moncure <mmoncure@gmail.com>)
List pgsql-novice
Hello,

This morning I conducted a simple test: I generated 10 000 samples of
100-dimensional data (uniformly distributed in [-10 000; 10 000]) and
inserted them into 2 newly created bases with only 1 table each. In one
case the table has a bytea column (table OID 2102835) on the other a
double precision[] (table OID 2102836). I generated scripts to insert
the data in the 2 formats.

After insertion, 'du -h' gives:
22M    ./2102835
15M    ./2102836

So the double precision[] is really smaller.

I guess that in my case (altering column) there may be some kind of
cache or maybe the toast table... It's really puzzling.

Mathieu
On 07/26/2011 09:19 PM, Merlin Moncure wrote:
> On Tue, Jul 26, 2011 at 2:02 PM, Mathieu Dubois<mathieu.dubois@limsi.fr>  wrote:
>> Are you sure that the length of each element is stored?
> no, I was wrong (I just checked the code) -- see CopyArrayEls. Null
> indicator is stored in a bitmap. hm.
>
> merlin
>


pgsql-novice by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: cast bytea to double precision[]
Next
From: "David Alexander Krois"
Date:
Subject: Orphaned files in the subdirectory of the database