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:18:05
Message-ID: 20090110001805.GJ20555@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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).

I'm not really sure about removing the other macros completely, because
they would be useful whenever one wanted to create something
nonstandard.

> BTW, are we just assuming that there's never a possibility of no match?
> It seems like there ought to be an elog complaint if you get to the
> bottom of the loop; which again is something I don't see the point of
> writing out each time.

We need to be quiet about it when not validating, I think.

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

Attachment Content-Type Size
reloptions-9.patch text/x-diff 17.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2009-01-10 00:42:09 Re: Updates of SE-PostgreSQL 8.4devel patches (r1389)
Previous Message Greg Smith 2009-01-09 23:37:11 Re: Improving compressibility of WAL files