Re: trailing whitespace in psql table output

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, David Fetter <david(at)fetter(dot)org>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, "David E(dot) Wheeler" <david(at)kineticode(dot)com>, Roger Leigh <rleigh(at)codelibre(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: trailing whitespace in psql table output
Date: 2010-09-28 17:31:17
Message-ID: 1285695077.20420.9.camel@vanquo.pezone.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On tis, 2010-09-28 at 12:18 -0400, Tom Lane wrote:
> I'm inclined to think that that's not a fatal objection; it's not like
> we haven't felt free to change psql's output format before. As long as
> we don't back-patch this change, it should be no worse than other things
> we've done to third-party code without a backwards glance.

In the past, pg_regress used diff -b or -w, so making whitespace changes
in psql was not a problem.

> It would be good to get rid of this whitespace because (I believe) it is
> one of very few reasons for needing to have any trailing whitespace in
> git-controlled files. If we could get to a point where trailing
> whitespace in patches could be rejected automatically, it'd eliminate
> one small pet peeve.

You won't be able to programmatically forbid all trailing whitespace (at
least without additional arrangements) because of:

psql -c 'select 1 as a, null as b' | cat -A
a | b$
---+---$
1 | $<===

Plus, there might be tests that check trailing space behavior or some
such, but I haven't looked for those.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-09-28 17:44:47 Re: trailing whitespace in psql table output
Previous Message Peter Eisentraut 2010-09-28 17:26:14 Re: trailing whitespace in psql table output