Skip site navigation (1) Skip section navigation (2)

Re: generic reloptions improvement

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: generic reloptions improvement
Date: 2008-12-22 16:24:53
Message-ID: 20081222162453.GE10220@alvh.no-ip.org (view raw or flat)
Thread:
Lists: pgsql-hackers
ITAGAKI Takahiro wrote:

> Alvaro Herrera <alvherre(at)commandprompt(dot)com> wrote:
> 
> > Here's a patch for improving the general reloptions mechanism.  What
> > this patch does is add a table-based option parser.  This allows adding
> > new options very easily, and stops the business of having to pass the
> > minimum and default fillfactor each time you want the reloptions
> > processed.
> 
> You use struct relopt_gen (and its subclasses) for the purpose of
> both "definition of options" and "parsed result". But I think
> it is cleaner to separete parsed results into another struct
> something like:

Thanks for the suggestion -- yes, it is better as you suggest.  I think
putting the default on the same struct was just out of laziness at
first, and inertia later.

Here's the next version, which also fixes some particularly embarrasing
bugs.

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

Attachment: reloptions-4.patch
Description: text/x-diff (21.9 KB)

In response to

Responses

pgsql-hackers by date

Next:From: Robert LorDate: 2008-12-22 16:35:41
Subject: Re: DTrace probes patch
Previous:From: Magnus HaganderDate: 2008-12-22 16:15:47
Subject: encoding cleanups in cvs repo

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group