Re: psql and tab-delimited output

From: David G Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: psql and tab-delimited output
Date: 2014-09-07 12:44:07
Message-ID: 1410093847224-5818097.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Alban Hertroys-4 wrote
> On 07 Sep 2014, at 10:45, Abelard Hoffman &lt;

> abelardhoffman@

> &gt; wrote:
>
>> For reports, everyone else mostly uses other tools? I'd like to stay away
>> from GUI-tools, if possible.
>
> For reporting, usually you use the data in the database directly.
>
> A TSV or CSV file is not a report, it’s at best a data source for your
> report. Going through an intermediate format is not a particularly
> effective approach to create reports, but if you have to (for example
> because you aren’t _allowed_ access to the database), generally preferred
> formats seem to be CSV, XML or JSON; as long as it’s a standard format.
> TSV is not a common choice. Are you sure your boss actually cares that
> it’s TSV and not, for example, CSV?

TSV is generally chosen as an interchange format because data rarely has
tabs...if your does that advantage goes away.

Same question regarding the report aspect. If the boss wants a human
readable text format report I'd suggest using the format function and output
the the resultant single column as-is to the screen. Fixed-width columns
are better than any kind of delimited format in that use case.

David J.

--
View this message in context: http://postgresql.1045698.n5.nabble.com/psql-and-tab-delimited-output-tp5818019p5818097.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Herouth Maoz 2014-09-07 13:59:33 Decreasing performance in table partitioning
Previous Message Alban Hertroys 2014-09-07 11:18:37 Re: psql and tab-delimited output