From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | Jim Nasby <jim(at)nasby(dot)net> |
Cc: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, heikki(dot)linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>, Jeff Davis <pgsql(at)j-davis(dot)com> |
Subject: | Re: feature request - datum_compute_size and datum write_should be public |
Date: | 2012-02-02 01:07:55 |
Message-ID: | 1328144828-sup-2169@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2012-02-02 01:30:18 | Re: Progress on fast path sorting, btree index creation time |
Previous Message | Alvaro Herrera | 2012-02-02 01:01:27 | heap_tuple_needs_freeze false positive |