Re: newlines at end of generated SQL

From: Fabrízio de Royes Mello <fabriziomello(at)gmail(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: newlines at end of generated SQL
Date: 2014-01-11 19:23:46
Message-ID: CAFcNs+qSKJdv6fBB5M7HB4H4rad99iZPL5ZvXmJXPmg2UiS0jg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Jan 11, 2014 at 1:21 AM, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
>
> On Thu, 2014-01-09 at 15:52 -0200, Fabrízio de Royes Mello wrote:
> >
> > On Thu, Jan 9, 2014 at 3:34 PM, Robert Haas <robertmhaas(at)gmail(dot)com>
> > wrote:
> > >
> > > On Wed, Jan 8, 2014 at 10:17 PM, Peter Eisentraut <peter_e(at)gmx(dot)net>
> > wrote:
> > > > Is there a reason why the programs in src/bin/scripts all put
> > newlines
> > > > at the end of the SQL commands they generate? This produces
> > useless
> > > > empty lines in the server log (and client output, if selected).
> > >
> > > If you're asking whether you can go ahead and fix that, +1 from me.
> > >
> >
> > Well... I did that...
>
> But you also need to add the newlines back for the --echo output.
> (Might as well use puts() then.)
>

Done!

--
Fabrízio de Royes Mello
Consultoria/Coaching PostgreSQL
>> Timbira: http://www.timbira.com.br
>> Blog sobre TI: http://fabriziomello.blogspot.com
>> Perfil Linkedin: http://br.linkedin.com/in/fabriziomello
>> Twitter: http://twitter.com/fabriziomello

Attachment Content-Type Size
remove-new-line-at-end-of-scripts_v2.patch text/x-diff 6.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2014-01-11 19:27:36 Re: units in postgresql.conf comments
Previous Message Bruce Momjian 2014-01-11 19:10:01 Re: Partitioning performance: cache stringToNode() of pg_constraint.ccbin