Re: How does TOAST compare to other databases' mechanisms? - Mailing list pgsql-general

From Philip Warner
Subject Re: How does TOAST compare to other databases' mechanisms?
Date
Msg-id 3.0.5.32.20001014221316.0215fbb0@mail.rhyme.com.au
Whole thread Raw
In response to Re: How does TOAST compare to other databases' mechanisms?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: How does TOAST compare to other databases' mechanisms?  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: How does TOAST compare to other databases' mechanisms?  (Jan Wieck <janwieck@yahoo.com>)
List pgsql-general
At 20:42 13/10/00 -0400, Tom Lane wrote:
>Philip Warner <pjw@rhyme.com.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   |/

pgsql-general by date:

Previous
From: "Warren Flemmer"
Date:
Subject: Postgresql 7 does not always start on RH 6.2
Next
From: Philip Warner
Date:
Subject: Re: Not null contraints