Re: Proposal: new border setting in psql - Mailing list pgsql-hackers

From D'Arcy J.M. Cain
Subject Re: Proposal: new border setting in psql
Date
Msg-id 20080829094504.8c2cc7fa.darcy@druid.net
Whole thread Raw
In response to Re: Proposal: new border setting in psql  ("D'Arcy J.M. Cain" <darcy@druid.net>)
Responses Re: Proposal: new border setting in psql  ("Jaime Casanova" <jcasanov@systemguards.com.ec>)
Re: Proposal: new border setting in psql  ("D'Arcy J.M. Cain" <darcy@druid.net>)
List pgsql-hackers
On Fri, 29 Aug 2008 06:55:45 -0400
"D'Arcy J.M. Cain" <darcy@druid.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@druid.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.


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: code coverage patch
Next
From: Tom Lane
Date:
Subject: Re: User defined I/O conversion casts