Re: Proposal: new border setting in psql

From: "D'Arcy J(dot)M(dot) Cain" <darcy(at)druid(dot)net>
To: "D'Arcy J(dot)M(dot) Cain" <darcy(at)druid(dot)net>
Cc: 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 13:45:04
Message-ID: 20080829094504.8c2cc7fa.darcy@druid.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, 29 Aug 2008 06:55:45 -0400
"D'Arcy J.M. Cain" <darcy(at)druid(dot)net> wrote:
> On Fri, 29 Aug 2008 01:29:14 -0400
> I think that your scan may have been a bit too cursory. Those
> characters, while significant in ReST, only matter when used in very
> specific ways. The following works just fine in my ReST application.
>
> +----+-------+
> | id | name |
> +====+=======+
> | 8 | T'est |
> +----+-------+
> | 9 | T*est |
> +----+-------+
> | 10 | T\est |
> +----+-------+

Oops. I was wrong about this one. The backslash needs to be escaped.
It also means expanding the other rows to match so this is the corner
case. In fact, for one or two backslashes you can double it and remove
the space at the start and/or end which is not so bad.

I'm surprised that we don't have a general option to escape special
characters. Perhaps that's the next small enhancement.

darcy=# \pset escape \

For example. The general output filter I suggested previously could
also deal with that, of course.

--
D'Arcy J.M. Cain <darcy(at)druid(dot)net> | Democracy is three wolves
http://www.druid.net/darcy/ | and a sheep voting on
+1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-08-29 15:06:47 Re: User defined I/O conversion casts
Previous Message Peter Eisentraut 2008-08-29 13:33:11 Re: code coverage patch