Re: BUG #12730: pg_dump produces trailing spaces

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: hans(at)matfyz(dot)cz
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #12730: pg_dump produces trailing spaces
Date: 2015-05-11 15:46:25
Message-ID: 20150511154625.GC13052@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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 <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Andres Freund 2015-05-11 16:47:59 Re: [BUGS] BUG #13148: Unexpected deferred EXCLUDE constraint violation on derived table
Previous Message Tom Lane 2015-05-11 15:23:15 Re: BUG #13267: Some timezones in pg_timezone_names are missing in pg_timezone_abbrevs