2011/8/18 Shigeru Hanada <shigeru.hanada@gmail.com>:
> Thanks for the review.
>
> (2011/08/13 3:59), Robert Haas wrote:
>> IMHO, the new format should put parentheses around the options list.
>
> Agreed. Revised version of patch has been attached. This version puts
> parentheses around FDW option only when it was not NULL.
ISTM you should do quote_ident() on the option names. For example, after:
create foreign data wrapper dummy;
create server s1 foreign data wrapper dummy;
create foreign table ft1 (a int) server s1 options ("(" ')');
With your patch, I get:
rhaas=# \d+ ft1 Foreign table "public.ft1"Column | Type | Modifiers | FDW Options | Storage |
Description
--------+---------+-----------+-------------+---------+-------------a | integer | | | plain
|
Server: s1
FDW Options: (( ')')
Has OIDs: no
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company