Euler Taveira de Oliveira wrote:
> Alvaro Herrera escreveu:
> > I wasn't sure of the best place to add a check. I have added it to
> > transformRelOptions; I am not entirely comfortable with it, because it
> > works, but it still allows this:
> >
> IMHO it's the appropriate place.
I think the best place would be parseRelOptions. The problem is that
transformRelOptions does not apply any semantics to the values it's
parsing; it doesn't know about the relopt_kind for example. That stuff
is only known by parseRelOptions, but when the options reach that point,
they have already lost the namespace (due to transformRelOptions).
> > alvherre=# alter index f set (toast.fillfactor = 20);
> > ALTER INDEX
> >
> Maybe you need to add relopt_kind test in your validation code.
No clean way to do that :-(
--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.