Skip site navigation (1) Skip section navigation (2)

TODO Item - Return compressed length of TOAST datatypes (WIP)

From: Mark Kirkwood <markir(at)paradise(dot)net(dot)nz>
To: pgsql-patches(at)postgresql(dot)org
Subject: TODO Item - Return compressed length of TOAST datatypes (WIP)
Date: 2005-06-17 23:22:49
Message-ID: 42B35B49.4000904@paradise.net.nz (view raw or flat)
Thread:
Lists: pgsql-patches
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?

regards

Mark









Attachment: pg_toast_compressed_length.patch
Description: text/plain (6.4 KB)

Responses

pgsql-patches by date

Next:From: Andreas PflugDate: 2005-06-18 08:42:02
Subject: default database creation with initdb
Previous:From: Bruce MomjianDate: 2005-06-17 16:47:43
Subject: Re: Quick little \h enhancement for psql

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group