Jeremy Drake wrote:
It looks like pg_column_size gives you the actual size on disk, ie after
compression.
What looks interesting for you would be byteaoctetlen or the function it
wraps, toast_raw_datum_size. See src/backend/access/heap/tuptoaster.c.
pg_column_size calls toast_datum_size, while
Bruce Momjian wrote:
Have you looked at the 8.1.X buildin function pg_column_size()?
Thanks Bruce for the lead. I didn't know what to grep for; this helps.
The header comment for that function says
"Return the size of a datum, possibly compressed"
I take it the uncompressed length i
It looks like pg_column_size gives you the actual size on disk, ie after
compression.
What looks interesting for you would be byteaoctetlen or the function it
wraps, toast_raw_datum_size. See src/backend/access/heap/tuptoaster.c.
pg_column_size calls toast_datum_size, while byteaoctetlen/textocte
Have you looked at the 8.1.X buildin function pg_column_size()?
---
Mark Dilger wrote:
> Hello, could anyone tell me, for a user contributed variable length data
> type,
> how can you access the length of the data without
Hello, could anyone tell me, for a user contributed variable length data type,
how can you access the length of the data without pulling the entire thing from
disk? Is there a function or macro for this?
As a first cut, I tried using the PG_DETOAST_DATUM_SLICE macro, but to no avail.
grep'in