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

Re: generic reloptions improvement

From: ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: generic reloptions improvement
Date: 2008-12-22 02:36:55
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Hi, I have a comment about the generic-reloptions patch.

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:

struct relopt_value
    const relopt_gen *which;
    bool    isset;
        bool    val_bool;
        int     val_int;
        double  val_real;
    } types;

the ariables 'isset' and 'parsed_val' are not used in definition, AFAICS.

ITAGAKI Takahiro
NTT Open Source Software Center

In response to


pgsql-hackers by date

Next:From: Jaime CasanovaDate: 2008-12-22 03:09:54
Subject: about truncate
Previous:From: Jeff DavisDate: 2008-12-22 01:56:06
Subject: Re: [PATCHES] GIN improvements

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