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

From Tom Lane
Subject Re: How does TOAST compare to other databases' mechanisms?
Date
Msg-id 924.971484126@sss.pgh.pa.us
Whole thread Raw
In response to Re: How does TOAST compare to other databases' mechanisms?  (Philip Warner <pjw@rhyme.com.au>)
Responses Re: How does TOAST compare to other databases' mechanisms?  (Philip Warner <pjw@rhyme.com.au>)
List pgsql-general
Philip Warner <pjw@rhyme.com.au> writes:
> At 10:12 9/10/00 -0400, Tom Lane wrote:
>> pg_attribute.  At the moment there's no user interface for that :-(
>> so you'd have to reach in with a manual "UPDATE pg_attribute" to
>> change it from the default value.  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?  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) and
finally applies the pg_attribute change.  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.

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.

            regards, tom lane

pgsql-general by date:

Previous
From: Dustin Sallings
Date:
Subject: Re: Is VACUUM ANALYZE a superset of VACUUM?
Next
From: Philip Warner
Date:
Subject: Re: Re: [HACKERS] My new job