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

Re: TOAST (was: BLOB)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jan Wieck <wieck(at)debis(dot)com>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-sql(at)postgresql(dot)org
Subject: Re: TOAST (was: BLOB)
Date: 2000-04-22 23:09:21
Message-ID: 29200.956444961@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-sql
wieck(at)debis(dot)com (Jan Wieck) writes:
>> What I meant was that they'd still work, with a limit on field size,
>> just like before.  ie, no TOAST support.

>     Yes, but at the first time, a toasted value is handed to them
>     the result (up to backend crash)  is  unpredictable.  So  any
>     user   defined   function   taking   "text"  as  argument  is
>     potentially in danger!

Oh, right, user-defined functions on system types will have problems
if the system type has been marked toastable.  I was thinking of
user-defined datatypes, for which it'd be OK to leave the type
untoastable if you didn't want to fix the associated functions right
away.

>     Better tell them they have to revise.

Well, hmm.  It's not out of the question that we could continue to
support old user-defined functions even on toastable types.  There is
going to be a compatibility wrapper anyway around any function that's
adhering to the old fmgr interface.  So with just a little more work,
we could make that wrapper expand any toasted values that are being
presented to the function.  Only new-style functions would ever get
passed toasted values directly.

This'd also make it a lot less painful to convert the built-in
functions, of course.

The only downside I see in this is that it'd take a few extra catalog
lookups to determine which arguments are toastable types and thus
potentially in need of untoasting.  I don't think that'd be a big loss,
since we normally only do the catalog lookups for a function reference
once per query anyway.

Seem reasonable?

			regards, tom lane

In response to

pgsql-sql by date

Next:From: Tom LaneDate: 2000-04-22 23:47:51
Subject: Re: Date_part & cast.
Previous:From: Jan WieckDate: 2000-04-22 20:44:52
Subject: Re: TOAST (was: BLOB)

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