Tiny patch on print.c of psql

From: Jean-Paul Argudo <jean-paul(at)argudo(dot)org>
To: PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Tiny patch on print.c of psql
Date: 2005-01-21 08:37:09
Message-ID: 41F0BF35.6000902@argudo.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Hi all,

This is my 1st patch ever in C :-)... I was just borried by a bad psql
\H html output of an EXPLAIN

because it didnt respected spaces sent from backend like:

-> Sort
-> Sort

I just remarked in this print.c the case of a white space wasnt handled
in the function escaping special caracters to HTML codes, so I added it
replacing a space by special html "&nbsp;" (& n b s p).

So we'll have now:

->&nbsp;Sort
&nbsp;&nbsp;->&nbsp;Sort

... in the html generated

(see example at http://www.pack-solutions.net/~jpargudo/explain.html)

Then, every single space in the html source is replaced by this. The
source looks ugly, yes, I will look to *only replacing starting spaces*
of each row of the EXPLAIN, thats will be my 1st patch ever, version 2 :)

So I post this patch only FYI.. I had much fun playing with C a bit :-)
(yes, I dont code C, just a bit of Perl and Python).

Cheers! Thanks again for such a powerfull release.

--
Jean-Paul Argudo
www.PostgreSQLFr.org

Attachment Content-Type Size
print.c.diff text/x-patch 331 bytes

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Dave Page 2005-01-21 09:39:13 Re: [PATCHES] pg_autovacuum fails to start - 8.0 Release
Previous Message Stephen Frost 2005-01-21 05:59:17 Merge pg_shadow && pg_group -- UNTESTED