Skip site navigation (1) Skip section navigation (2)

Re: Proposal: new border setting in psql

From: "D'Arcy J(dot)M(dot) Cain" <darcy(at)druid(dot)net>
To: "Asko Oja" <ascoja(at)gmail(dot)com>
Cc: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Proposal: new border setting in psql
Date: 2008-08-21 20:35:54
Message-ID: 20080821163554.f1a0aadd.darcy@druid.net (view raw or flat)
Thread:
Lists: pgsql-hackers
On Thu, 21 Aug 2008 23:22:28 +0300
"Asko Oja" <ascoja(at)gmail(dot)com> wrote:
> The idea would be to use psql as backend for some other system?
> Or what do you mean by fed directly?

No, I meant that one would do any ad hoc query and cut and paste the
output directly into a tracking tool that supports ReST.  As I
explained in another message though, this is a nice side effect for me
and is the reason that I have an interest in coding it but it really is
a logical extension of what we have anyway.  Look how simple the
documentation change would be.  If you left out the extra example it's
a one line difference.

Index: src/sgml/ref/psql-ref.sgml
===================================================================
RCS file: /cvsroot/pgsql/doc/src/sgml/ref/psql-ref.sgml,v
retrieving revision 1.209
diff -u -p -u -r1.209 psql-ref.sgml
--- src/sgml/ref/psql-ref.sgml  3 Jul 2008 03:37:16 -0000       1.209
+++ src/sgml/ref/psql-ref.sgml  21 Aug 2008 20:31:24 -0000
@@ -1570,7 +1570,7 @@ lo_import 152801
           <acronym>HTML</acronym> mode, this will translate directly
           into the <literal>border=...</literal> attribute, in the
           others only values 0 (no border), 1 (internal dividing lines),
-          and 2 (table frame) make sense.
+          2 (table frame) and 3 (individual cells) make sense.
           </para>
           </listitem>
           </varlistentry>
@@ -2973,6 +2973,22 @@ peter(at)localhost testdb=&gt; <userinput>S
 +-------+--------+
 (4 rows)
 
+peter(at)localhost testdb=&gt; <userinput>\pset border 3</userinput>
+Border style is 3.
+peter(at)localhost testdb=&gt; <userinput>SELECT * FROM my_table;</userinput>
++-------+--------+
+| first | second |
++=======+========+
+|     1 | one    |
++-------+--------+
+|     2 | two    |
++-------+--------+
+|     3 | three  |
++-------+--------+
+|     4 | four   |
++-------+--------+
+(4 rows)
+
 peter(at)localhost testdb=&gt; <userinput>\pset border 0</userinput>
 Border style is 0.
 peter(at)localhost testdb=&gt; <userinput>SELECT * FROM my_table;</userinput>

-- 
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

pgsql-hackers by date

Next:From: Bruce MomjianDate: 2008-08-21 20:39:16
Subject: Re: WIP patch: reducing overhead for repeat de-TOASTing
Previous:From: Bruce MomjianDate: 2008-08-21 20:26:35
Subject: Re: [HACKERS] [FINALLY] the TODO list has migrated to Wiki

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group