Re: How does TOAST compare to other databases' mechanisms?

From: Philip Warner <pjw(at)rhyme(dot)com(dot)au>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Frank Joerdens <frank(at)joerdens(dot)de>, pgsql-general(at)postgresql(dot)org
Subject: Re: How does TOAST compare to other databases' mechanisms?
Date: 2000-10-14 12:13:16
Message-ID: 3.0.5.32.20001014221316.0215fbb0@mail.rhyme.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

At 20:42 13/10/00 -0400, Tom Lane wrote:
>Philip Warner <pjw(at)rhyme(dot)com(dot)au> writes:
>> At 10:12 9/10/00 -0400, Tom Lane wrote:
>>> Someone should work on adding an
>>> ALTER command to change it in a more user-friendly fashion.
>
>> If I wanted to do this, how long do you think it would take (given that I
>> have not done anything similar so far)?
>
>Hard to say. Do you know anything about yacc grammars?

I added a 'get statistics' statement to plpgsql a while back, but I don't
think it made it into CVS. So yes, I have at least seen yacc before.

> You'd have
>to add a production to gram.y to define the syntax, probably extend
>the existing AlterStmt data structure (which implies touching support
>code in backend/nodes), and then add some execution code that checks
>for a valid command (ie, that the data column type is toastable)

This sounds fine, but begs the question: if there is TOASTed data in the
table and the column is set to 'not TOASTed', will TOAST cope? And vice verca?

>finally applies the pg_attribute change.

This sounds cloneable.

>All told it might be a couple
>hundred lines of new or changed code. Pretty much all of this could
>be done by cribbing from existing code (ie. programming-by-example)
>which is a good thing because there's not much documentation.

So it might be worh documenting, too...

>Someone who already knew what they were doing could do it in an hour
>or two. Not sure how much learning time you'd need to figure on top
>of that. But if you're interested in learning to hack the backend,
>this seems like a pretty reasonable first project.

Sounds good to me; if I can't get it into the beta, then it's no real
problem I guess. Main constraint will be my real work, which is fairly
intense at the moment.

----------------------------------------------------------------
Philip Warner | __---_____
Albatross Consulting Pty. Ltd. |----/ - \
(A.B.N. 75 008 659 498) | /(@) ______---_
Tel: (+61) 0500 83 82 81 | _________ \
Fax: (+61) 0500 83 82 82 | ___________ |
Http://www.rhyme.com.au | / \|
| --________--
PGP key available upon request, | /
and from pgp5.ai.mit.edu:11371 |/

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Philip Warner 2000-10-14 12:29:09 Re: Not null contraints
Previous Message Warren Flemmer 2000-10-14 10:23:11 Postgresql 7 does not always start on RH 6.2