Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id EA71019B3F2A for ; Mon, 28 Nov 2011 12:52:14 -0400 (AST) Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RV4RA-0006ZG-RH for pgsql-bugs@postgresql.org; Mon, 28 Nov 2011 16:52:14 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id pASGpxAo011057; Mon, 28 Nov 2011 11:51:59 -0500 (EST) To: Ronan Dunklau cc: pgsql-bugs@postgresql.org Subject: Re: pg_dump - foreign table - server name is not quoted In-reply-to: <4ED38CE3.5060503@gmail.com> References: <4ED38CE3.5060503@gmail.com> Comments: In-reply-to Ronan Dunklau message dated "Mon, 28 Nov 2011 14:30:11 +0100" Date: Mon, 28 Nov 2011 11:51:58 -0500 Message-ID: <11056.1322499118@sss.pgh.pa.us> From: Tom Lane X-Pg-Spam-Score: -3.1 (---) X-Archive-Number: 201111/192 X-Sequence-Number: 31787 Ronan Dunklau writes: > When dumping foreign tables, the server name is not properly quoted, > which leads to unrestorable dumps. Clearly a bug. > Please look at the attached test case and the proposed patch. I think this patch is not in keeping with typical coding practices in pg_dump. Usually we prefer to retrieve names from the server as-is, then apply fmtId() when printing them --- this is more flexible than having possibly-pre-quoted names in pg_dump's internal state. Will fix it the latter way. Thanks for the report! regards, tom lane