Re: reloptions with a "namespace" - Mailing list pgsql-hackers

From Euler Taveira de Oliveira
Subject Re: reloptions with a "namespace"
Date
Msg-id 496E8BCB.1000804@timbira.com
Whole thread Raw
In response to Re: reloptions with a "namespace"  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-hackers
Alvaro Herrera escreveu:
> 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).
> 
[Looking at your patch...] You're right. The only command that doesn't use
parseRelOptions() is ALTER INDEX. Is it the case to add a call at
index_reloptions() too? If it is not the case, I think you need to pass
'nmspc.relopt=value' instead of 'relopt=value' at transformRelOptions(). Of
course, you'll need to add some code at index_reloptions() to validate reloptions.

The following message doesn't say much. Isn't it the case to replace
'opt_definition' with 'OptWith' variant at gram.y?

euler=# create index fooi on foo(a) with (nmspc.relopt = 32);
ERROR:  syntax error at or near "."
LINHA 1: create index fooi on foo(a) with (nmspc.relopt = 32);                                               ^


--  Euler Taveira de Oliveira http://www.timbira.com/


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Re: [COMMITTERS] pgsql: Make 'find' syntax consistent; add .git exclusion to make_ctags.
Next
From: Andrew Dunstan
Date:
Subject: Re: Visibility map, partial vacuums