Re: generic reloptions improvement - Mailing list pgsql-hackers

From ITAGAKI Takahiro
Subject Re: generic reloptions improvement
Date
Msg-id 20081222110515.846E.52131E4D@oss.ntt.co.jp
Whole thread Raw
In response to generic reloptions improvement  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: generic reloptions improvement  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-hackers
Hi, I have a comment about the generic-reloptions patch.

Alvaro Herrera <alvherre@commandprompt.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;   union   {       bool    val_bool;       int     val_int;       double
val_real;  } types;
 
};

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

Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center




pgsql-hackers by date:

Previous
From: Jeff Davis
Date:
Subject: Re: [PATCHES] GIN improvements
Next
From: "Jaime Casanova"
Date:
Subject: about truncate