Excerpts from Jim Nasby's message of mié feb 01 20:47:05 -0300 2012:
> I'm not certain this in what Pavel is referring to, but I have often wished that I could pass something like an array into a function and have the function tell me exactly how much space that would require on-disk. It's pretty easy to figure that out for things like varchar and numeric, but doing so for arrays or composite types requires pretty detailed knowledge of PG internals.
I think you can just use pg_column_size on a composite datum (such as a
ROW() construct) and it will give you the right number.
Álvaro Herrera <alvherre(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
In response to
pgsql-hackers by date
|Next:||From: Alvaro Herrera||Date: 2012-02-02 01:30:18|
|Subject: Re: Progress on fast path sorting, btree index creation time|
|Previous:||From: Alvaro Herrera||Date: 2012-02-02 01:01:27|
|Subject: heap_tuple_needs_freeze false positive|