Re: Updates of SE-PostgreSQL 8.4devel patches (r1389)

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: KaiGai Kohei <kaigai(at)kaigai(dot)gr(dot)jp>, KaiGai Kohei <kaigai(at)ak(dot)jp(dot)nec(dot)com>, pgsql-hackers(at)postgresql(dot)org, bruce(at)momjian(dot)us, simon(at)2ndQuadrant(dot)com
Subject: Re: Updates of SE-PostgreSQL 8.4devel patches (r1389)
Date: 2009-01-10 00:42:09
Message-ID: 20090110004209.GL20555@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro Herrera wrote:
> Tom Lane wrote:
>
> > I guess I'm still wondering which part of this actually needs to be
> > hand-coded so that it can be flexible. I'm envisioning the whole
> > loop replaced by something like
> >
> > FillRelOptions((void *) rdopts, options, &constanttable);
> >
> > where the constant table contains entries like
> >
> > { "fillfactor", RELOPT_TYPE_INT, offsetof(StdRdOptions, fillfactor) }
>
> I attach a patch that does things this way (it includes the btree test
> code because I'm too lazy right now to strip it out).

The irony of doing things this way is that we've come full-circle from
the original coding of these routines (the main difference being that
the default values and checks no longer need to be written as code, but
rather as table entries).

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Aidan Van Dyk 2009-01-10 01:37:34 Re: Improving compressibility of WAL files
Previous Message Alvaro Herrera 2009-01-10 00:18:05 Re: Updates of SE-PostgreSQL 8.4devel patches (r1389)