Re: BUG #13840: pg_dump generates unloadable SQL when third party string type index option is used - Mailing list pgsql-bugs

From Kouhei Sutou
Subject Re: BUG #13840: pg_dump generates unloadable SQL when third party string type index option is used
Date
Msg-id 20160101.181428.648571074852937725.kou@clear-code.com
Whole thread Raw
In response to BUG #13840: pg_dump generates unloadable SQL when third party string type index option is used  (kou@clear-code.com)
Responses Re: BUG #13840: pg_dump generates unloadable SQL when third party string type index option is used
List pgsql-bugs
Hi,

In <20151231153522.1117.56276@wrigleys.postgresql.org>
  "[BUGS] BUG #13840: pg_dump generates unloadable SQL when third party string type index option is used" on Thu, 31
Dec2015 15:35:22 +0000, 
  kou@clear-code.com wrote:

> Bug reference:      13840
> Logged by:          Kouhei Sutou
> Email address:      kou@clear-code.com
> PostgreSQL version: 9.4.5
> Operating system:   Debian GNU/Linux sid
> Description:
...
> pg_dump generates "CREATE INDEX ... WITH ..." without quotation for
> option value:
>
>   % pg_dump -d option_test
>   ...
>   CREATE TABLE t (
>       c text
>   );
>   ...
>   CREATE INDEX pgroonga_index ON t USING pgroonga (c) WITH (normalizer=none);
>   ...
>
> "normalizer=none" causes error on restoring the dump.
>
> pg_dump should generates "normalizer='none'" as option to avoid the
> error.

I attach a patch.
With this patch, pg_dump generates string index option value
with quote like the following:

  CREATE INDEX pgrn_index ON memos USING pgroonga (title) WITH (normalizer='none');


Thanks,
--
kou

pgsql-bugs by date:

Previous
From: Michael Paquier
Date:
Subject: Re: BUG #13839: command line restart server fail
Next
From: floriparob@gmail.com
Date:
Subject: BUG #13841: Unable to set autocommit in psql