Re: reloptions with a "namespace"

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: reloptions with a "namespace"
Дата
Msg-id 20090114144332.GF24156@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: reloptions with a "namespace"  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: reloptions with a "namespace"  (Euler Taveira de Oliveira <euler@timbira.com>)
Список pgsql-hackers
Tom Lane wrote:
> Alvaro Herrera <alvherre@commandprompt.com> writes:
> > This uses a new parse node.
> 
> You need at least equalfuncs.c support for that, and outfuncs would be
> advisable.

Added.

> > One possible disadvantage is that a command
> > like this works, but does nothing:
> > alvherre=# alter table foo set (test.foo = 1);
> 
> Uh, why doesn't it throw an error?  We throw error for unrecognized
> reloptions in general.

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:

alvherre=# alter index f set (toast.fillfactor = 20);
ALTER INDEX

The original case now fails correctly with

alvherre=# alter table foo set (test.foo = 1);
ERROR:  22023: unrecognized parameter namespace "test"
UBICACIÓN:  transformRelOptions, /pgsql/source/04toastopt/src/backend/access/common/reloptions.c:490
alvherre=# alter table foo set (toast.foo = 1);
ERROR:  22023: unrecognized parameter "foo"
UBICACIÓN:  parseRelOptions, /pgsql/source/04toastopt/src/backend/access/common/reloptions.c:694


-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Documenting pglesslog
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Updates of SE-PostgreSQL 8.4devel patches (r1403)