Re: Proposal: new border setting in psql

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Joshua Drake <jd(at)commandprompt(dot)com>, Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec>, "D'Arcy J(dot)M(dot) Cain" <darcy(at)druid(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Greg Smith <gsmith(at)gregsmith(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Asko Oja <ascoja(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Proposal: new border setting in psql
Date: 2008-08-29 17:07:36
Message-ID: 874p5321if.fsf@oxford.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:

> Joshua Drake escribió:
>
>> I am trying to understand why we are having a client do this? If you
>> want some other type of output, script it.
>
> Convenience. If we had real rst output, we could just copy'n paste into
> Trac or other systems.

I'm starting to think D'Arcy's on the right track here.

Keep in mind the use case here is as Alvaro says, just a user convenience
thing. It's not meant for file dumps and loads. If we're going to display an
ascii table we may as well use the same formatting as other tools so it can be
copy/pasted in.

Given that it's just a user convenience thing then I'm not sure the escaping
is necessarily a big deal. If the user happens to have any backslashes in
their data they can always stick a replace() call in their SQL. Perhaps we
should prove a rest_escape() function for that purpose.

I wonder if it's worth keeping two variants at all really. Why not just make
psql's native table formatting exactly ReST? Is there any part of it that we
don't like as much as our existing tables?

--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Get trained by Bruce Momjian - ask me about EnterpriseDB's PostgreSQL training!

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2008-08-29 17:32:07 Re: [PATCHES] pg_dump lock timeout
Previous Message Hitoshi Harada 2008-08-29 17:04:27 Window functions patch v04 for the September commit fest