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

Re: reloptions with a "namespace"

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Euler Taveira de Oliveira <euler(at)timbira(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-14 15:15:21
Message-ID: 20090114151521.GG24156@alvh.no-ip.org (view raw or flat)
Thread:
Lists: pgsql-hackers
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.

Attachment: reloptions-namespace-2.patch
Description: text/x-diff (41.3 KB)

In response to

Responses

pgsql-hackers by date

Next:From: Robert HaasDate: 2009-01-14 15:15:46
Subject: Re: Updates of SE-PostgreSQL 8.4devel patches (r1403)
Previous:From: KaiGai KoheiDate: 2009-01-14 15:11:43
Subject: Re: Updates of SE-PostgreSQL 8.4devel patches (r1403)

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