Re: reloptions with a "namespace"

From: Euler Taveira de Oliveira <euler(at)timbira(dot)com>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: reloptions with a "namespace"
Date: 2009-01-15 01:05:15
Message-ID: 496E8BCB.1000804@timbira.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2009-01-15 01:18:34 Re: Visibility map, partial vacuums
Previous Message Bruce Momjian 2009-01-15 00:58:20 Re: Re: [COMMITTERS] pgsql: Make 'find' syntax consistent; add .git exclusion to make_ctags.