From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter_e@gmx.net>
Cc: Jan Wieck <wieck@debis.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: TOAST (was: BLOB)
Date: Sun, 23 Apr 2000 10:57:45 -0400
Message-ID: <14004.956501865@sss.pgh.pa.us> (raw)
In-Reply-To: <Pine.LNX.4.21.0004231530520.377-100000@localhost.localdomain>
References: <Pine.LNX.4.21.0004231530520.377-100000@localhost.localdomain>
Peter Eisentraut <peter_e@gmx.net> writes:
> What datatypes besides text'ish and binary data'ish do you want to toast?
> SQL(3) only defines CLOB and BLOB, so they might be thinking along my
> lines. I mean surely having toastable polygons and numerics has some
> theoretical value but is it worth bothering?
Good point. The only possible candidates for toasting are varlena
types, which are
select oid,typname from pg_type
where typtype='b' and typlen < 0 and typname !~ '^_';
oid | typname
------+---------
17 | bytea
25 | text
32 | SET
602 | path
604 | polygon
705 | unknown
869 | inet
650 | cidr
1042 | bpchar
1043 | varchar
1560 | bit
1562 | varbit
1625 | lztext
1700 | numeric
(14 rows)
plus array types (of which there are lots, but only one set of access
routines needs to deal with toasting). I find it hard to foresee any
need for toasted inet/cidr data ;-), and I'm not even sure what SET is.
And unknown is just a placeholder, and lztext is going away anyway.
So I'd say we have
MUSTs: bytea, text, bpchar, varchar, arrays
WANTs: bit, varbit, numeric
LOW PRIORITY: path, polygon
which is not so many types after all... although some of these are used
by a lot of routines:
select pg_type.oid,typname,count(*) from pg_type, pg_proc
where typtype='b' and typlen < 0 and typname !~ '^_' and pg_type.oid
in (proargtypes[0],proargtypes[1],proargtypes[2],proargtypes[3],
proargtypes[4],proargtypes[5],proargtypes[6],proargtypes[7])
group by pg_type.oid,typname;
oid | typname | count
------+---------+-------
17 | bytea | 6
25 | text | 88
602 | path | 29
604 | polygon | 24
869 | inet | 16
1042 | bpchar | 22
1043 | varchar | 14
1560 | bit | 15
1562 | varbit | 15
1625 | lztext | 12
1700 | numeric | 45
(11 rows)
(This is an overestimate since routines with multiple arguments may be
counted in more than one category...)
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, peter_e@gmx.net, wieck@debis.com
Subject: Re: TOAST (was: BLOB)
In-Reply-To: <14004.956501865@sss.pgh.pa.us>
References: <Pine.LNX.4.21.0004231530520.377-100000@localhost.localdomain> <14004.956501865@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox