Re: Is this a bug? - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Is this a bug?
Date
Msg-id CA+Tgmobr9tkFUoUvFCJoA4fkrjz6Vd+KScd0yYpROsXZxaC4eQ@mail.gmail.com
Whole thread Raw
In response to Is this a bug?  (Fabrízio de Royes Mello <fabriziomello@gmail.com>)
Responses Re: Is this a bug?  (Fabrízio de Royes Mello <fabriziomello@gmail.com>)
List pgsql-hackers
On Wed, Mar 12, 2014 at 11:11 PM, Fabrízio de Royes Mello
<fabriziomello@gmail.com> wrote:
> Hi all,
>
> Shouldn't the "ALTER" statements below raise an exception?
>
> fabrizio=# CREATE TABLE foo(bar SERIAL PRIMARY KEY);
> CREATE TABLE
>
> fabrizio=# SELECT relname, reloptions FROM pg_class WHERE relname ~ '^foo';
>    relname   | reloptions
> -------------+------------
>  foo         |
>  foo_bar_seq |
>  foo_pkey    |
> (3 rows)
>
> fabrizio=# ALTER TABLE foo RESET (noname);
> ALTER TABLE
>
> fabrizio=# ALTER INDEX foo_pkey RESET (noname);
> ALTER INDEX
>
> fabrizio=# ALTER TABLE foo ALTER COLUMN bar RESET (noname);
> ALTER TABLE
>
>
> If I try to "SET" an option called "noname" obviously will raise an
> exception:
>
> fabrizio=# ALTER TABLE foo SET (noname=1);
> ERROR:  unrecognized parameter "noname"

Well, it's fairly harmless, but it might not be a bad idea to tighten that up.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: jsonb and nested hstore
Next
From: Andres Freund
Date:
Subject: Re: [PATCH] Store Extension Options