I thought I would have a look at:
(Datatypes) Add function to return compressed length of TOAST data values.
A WIP patch is attached for comment (wanted to check I hadn't bitten off
more than I could chew *before* asking questions!).
A few questions come to mind:
1) The name - I have called it 'toast_compressed_length'. Seems longish
- I'm wondering if just 'compressed_length' is ok?
2) What should be returned for toasted data that is not compressed (or
plain stored data for that matter)? The WIP patch just gives the
uncompressed size (I notice I may need to subtract VARHDRSZ in some cases).
3) What should be returned for non-varlena types? The WIP patch is
treating everything as a varlena, so is returning incorrect information
for that case.
4) The builtin is declared as immutable - I am not so sure about that (I
am wondering if altering a column's storage from MAIN -> EXTENDED and
then updating the column to be itself will fool it).
5) Any multi-byte locale considerations?
pgsql-patches by date
|Next:||From: Andreas Pflug||Date: 2005-06-18 08:42:02|
|Subject: default database creation with initdb|
|Previous:||From: Bruce Momjian||Date: 2005-06-17 16:47:43|
|Subject: Re: Quick little \h enhancement for psql|