Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2]) by hub.org (8.9.3/8.9.3) with ESMTP id KAA98772 for ; Sun, 23 Apr 2000 10:57:55 -0400 (EDT) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id KAA14007; Sun, 23 Apr 2000 10:57:45 -0400 (EDT) To: Peter Eisentraut cc: Jan Wieck , pgsql-sql@postgresql.org Subject: Re: TOAST (was: BLOB) In-reply-to: References: Comments: In-reply-to Peter Eisentraut message dated "Sun, 23 Apr 2000 15:48:26 +0200" Date: Sun, 23 Apr 2000 10:57:45 -0400 Message-ID: <14004.956501865@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200004/263 Peter Eisentraut 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