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.