Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YrpuY-0007y9-MH for pgsql-bugs@arkaria.postgresql.org; Mon, 11 May 2015 15:46:30 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YrpuY-0003uF-79 for pgsql-bugs@arkaria.postgresql.org; Mon, 11 May 2015 15:46:30 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YrpuX-0003u9-Hv for pgsql-bugs@postgresql.org; Mon, 11 May 2015 15:46:29 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1YrpuV-0004Ji-1I for pgsql-bugs@postgresql.org; Mon, 11 May 2015 15:46:28 +0000 Received: from bruce by momjian.us with local (Exim 4.72) (envelope-from ) id 1YrpuT-0006d3-5K; Mon, 11 May 2015 11:46:25 -0400 Date: Mon, 11 May 2015 11:46:25 -0400 From: Bruce Momjian To: hans@matfyz.cz Cc: pgsql-bugs@postgresql.org Subject: Re: BUG #12730: pg_dump produces trailing spaces Message-ID: <20150511154625.GC13052@momjian.us> References: <20150202143116.2585.12308@wrigleys.postgresql.org> <20150428234018.GE31727@momjian.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150428234018.GE31727@momjian.us> User-Agent: Mutt/1.5.20 (2009-06-14) X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On Tue, Apr 28, 2015 at 07:40:18PM -0400, Bruce Momjian wrote: > > Try > > pg_dump --format=p --schema=information_schema --schema-only --file=is.sql > > > > It seams there are trailing spaces in the comment line > > -- Name: sql_implementation_info; Type: TABLE; Schema: information_schema; > > Owner: postgres; Tablespace: > > > > Skip the string '; Tablespace: ' please, if there is no tablespace or put > > '-' for the tablespace name in the same way as dash is used for Owner when > > the option --no-owner is used. > > I looked into this issue and found that the pg_dump code doesn't handle > cases where the reltablespace == 0 (default). I have modified pg_dump > to test for a zero-length string as well, and this suppresses the > "Tablespace:" field. Patch attached. Patch applied. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + Everyone has their own god. + -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs