Re: Proposal: new border setting in psql

From: Greg Smith <gsmith(at)gregsmith(dot)com>
To: "D'Arcy J(dot)M(dot) Cain" <darcy(at)druid(dot)net>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, bruce(at)momjian(dot)us, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Proposal: new border setting in psql
Date: 2009-01-08 18:37:01
Message-ID: Pine.GSO.4.64.0901081241250.11423@westnet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 8 Jan 2009, D'Arcy J.M. Cain wrote:

>> Some people suggests that this is so close to rst that I should just use
>> it as if it were, and hand-edit the output for the rare cases where it
>> doesn't comply. I don't find this very compelling.
>
> The cases are so rare that I can't remember what they were if any.

http://archives.postgresql.org/pgsql-hackers/2008-08/msg01310.php had
Tom's concerns. Since the ReST Grid Tables you're using is built with the
characters "-", "=", "|", and "+", those would seem the minimum that would
need to be escaped with a \, along with the \ itself, before this would be
likely to work with arbitrary table input.

After spending some time assembling a list of special characters, I had an
ah-ha moment when I realized they are all listed in the "Sections" section
as "section title adornment characters":

! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \ ] ^ _ ` { | } ~

Every markup character I found elsewhere shows up in this list, so that
seems like the definitive one: escape any character that appears there
with a \, and I don't see any obvious cases left that will keep this from
being valid ReST output. Shouldn't be a lot of code to add that feature,
and then I think most of the criticism of this patch would go away.

I also note that there are some bullet and arrow inputs it will treat as
special, see "Bullet Lists" in
http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html
Seems reasonable to just document that non-ASCII input is somewhat
perilious as a known limitation.

--
* Greg Smith gsmith(at)gregsmith(dot)com http://www.gregsmith.com Baltimore, MD

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Smith 2009-01-08 18:44:13 Re: Proposal: new border setting in psql
Previous Message Tom Lane 2009-01-08 18:32:34 Re: Some more function-default issues