newlines at end of generated SQL

Started by Peter Eisentrautover 12 years ago6 messageshackers
Jump to latest
#1Peter Eisentraut
peter_e@gmx.net

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).

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#2Robert Haas
robertmhaas@gmail.com
In reply to: Peter Eisentraut (#1)
Re: newlines at end of generated SQL

On Wed, Jan 8, 2014 at 10:17 PM, Peter Eisentraut <peter_e@gmx.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.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#3Fabrízio de Royes Mello
fabriziomello@gmail.com
In reply to: Robert Haas (#2)
Re: newlines at end of generated SQL

On Thu, Jan 9, 2014 at 3:34 PM, Robert Haas <robertmhaas@gmail.com> wrote:

On Wed, Jan 8, 2014 at 10:17 PM, Peter Eisentraut <peter_e@gmx.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...

Regards,

--
Fabrízio de Royes Mello
Consultoria/Coaching PostgreSQL

Show quoted text

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

Attachments:

remove-new-line-at-end-of-scripts_v1.patchtext/x-diff; charset=US-ASCII; name=remove-new-line-at-end-of-scripts_v1.patchDownload+12-12
#4Peter Eisentraut
peter_e@gmx.net
In reply to: Fabrízio de Royes Mello (#3)
Re: newlines at end of generated SQL

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@gmail.com>
wrote:

On Wed, Jan 8, 2014 at 10:17 PM, Peter Eisentraut <peter_e@gmx.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.)

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#5Fabrízio de Royes Mello
fabriziomello@gmail.com
In reply to: Peter Eisentraut (#4)
Re: newlines at end of generated SQL

On Sat, Jan 11, 2014 at 1:21 AM, Peter Eisentraut <peter_e@gmx.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@gmail.com>
wrote:

On Wed, Jan 8, 2014 at 10:17 PM, Peter Eisentraut <peter_e@gmx.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

Show quoted text

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

Attachments:

remove-new-line-at-end-of-scripts_v2.patchtext/x-diff; charset=US-ASCII; name=remove-new-line-at-end-of-scripts_v2.patchDownload+21-21
#6Peter Eisentraut
peter_e@gmx.net
In reply to: Fabrízio de Royes Mello (#5)
Re: newlines at end of generated SQL

committed

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers