pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedFormatting the output
7+ messages / 4 participants
[nested] [flat]
* Formatting the output
@ 1999-07-29 17:02 G. Anthony Reina <reina@nsi.edu>
0 siblings, 3 replies; 7+ messages in thread
From: G. Anthony Reina @ 1999-07-29 17:02 UTC (permalink / raw)
To: pgsql-sql
Is there a way that I can supress the column heading and the "(# rows)"
which come before and after the following psql command:
psql -e db01 -c "select tablename from pg_tables where tablename NOT
LIKE 'pg%'"
The current output is:
tablename
=======
table1
table2
table3
table4
(4 rows)
What I'd like to get is simply:
table1
table2
table3
table4
Thanks.
-Tony
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: [SQL] Formatting the output
@ 1999-07-29 17:34 Bill Brandt <brandtwr-pgsql@draaw.net>
parent: G. Anthony Reina <reina@nsi.edu>
2 siblings, 1 reply; 7+ messages in thread
From: Bill Brandt @ 1999-07-29 17:34 UTC (permalink / raw)
To: G. Anthony Reina <reina@nsi.edu>; +Cc: pgsql-sql
Try:
psql db01 -c "select tablename from pg_tables where tablename NOT LIKE '%pg%'" -t
The -e makes it display the QUERY: <whatever> line... so removing it fixes that
problem... the -t tells it not to show the column headings and such...
Bill
On Thu, Jul 29, 1999 at 10:02:13AM -0700, G. Anthony Reina wrote:
>Is there a way that I can supress the column heading and the "(# rows)"
>which come before and after the following psql command:
>
>psql -e db01 -c "select tablename from pg_tables where tablename NOT
>LIKE 'pg%'"
>
>
>The current output is:
>
>tablename
>=======
>table1
>table2
>table3
>table4
>(4 rows)
>
>What I'd like to get is simply:
>
>table1
>table2
>table3
>table4
>
>
>Thanks.
>-Tony
>
>
>
--
Liam
Bill Brandt
brandtwr@draaw.net http://www.draaw.net/
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: [SQL] Formatting the output
@ 1999-07-29 17:41 Bruce Momjian <maillist@candle.pha.pa.us>
parent: G. Anthony Reina <reina@nsi.edu>
2 siblings, 0 replies; 7+ messages in thread
From: Bruce Momjian @ 1999-07-29 17:41 UTC (permalink / raw)
To: G. Anthony Reina <reina@nsi.edu>; +Cc: pgsql-sql
> Is there a way that I can supress the column heading and the "(# rows)"
> which come before and after the following psql command:
>
> psql -e db01 -c "select tablename from pg_tables where tablename NOT
> LIKE 'pg%'"
How about psql -qt:
#$ sql -qt test
select * from pg_language;
internal|f |f | 0|n/a
lisp |f |f | 0|/usr/ucb/liszt
C |f |f | 0|/bin/cc
sql |f |f | 0|postgres
The manual page says -q turns off row count, but -t does. I will fix
that now.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: [SQL] Formatting the output
@ 1999-07-29 17:43 Bruce Momjian <maillist@candle.pha.pa.us>
parent: G. Anthony Reina <reina@nsi.edu>
2 siblings, 1 reply; 7+ messages in thread
From: Bruce Momjian @ 1999-07-29 17:43 UTC (permalink / raw)
To: Thomas G. Lockhart <lockhart@alumni.caltech.edu>; +Cc: pgsql-sql
Thomas, please change the psql manual page to say -t turns off headings
and the row count, and change -q to not mention turning off of row
count, ok? I believe you are controlling the master manual pages
copies.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: [SQL] Formatting the output
@ 1999-07-29 18:37 G. Anthony Reina <reina@nsi.edu>
parent: Bill Brandt <brandtwr-pgsql@draaw.net>
0 siblings, 0 replies; 7+ messages in thread
From: G. Anthony Reina @ 1999-07-29 18:37 UTC (permalink / raw)
To: Bill Brandt <brandtwr-pgsql@draaw.net>; pgsql-sql; Bruce Momjian <maillist@candle.pha.pa.us>
Bill Brandt wrote:
> Try:
>
> psql db01 -c "select tablename from pg_tables where tablename NOT LIKE '%pg%'" -t
>
> The -e makes it display the QUERY: <whatever> line... so removing it fixes that
> problem... the -t tells it not to show the column headings and such...
>
Bruce Momjian wrote:
> How about psql -qt:
>
> #$ sql -qt test
> select * from pg_language;
> internal|f |f | 0|n/a
> lisp |f |f | 0|/usr/ucb/liszt
> C |f |f | 0|/bin/cc
> sql |f |f | 0|postgres
>
> The manual page says -q turns off row count, but -t does. I will fix
> that now.
>
Thanks. That works fine.
-Tony
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: [SQL] Formatting the output
@ 1999-07-30 00:30 Thomas Lockhart <lockhart@alumni.caltech.edu>
parent: Bruce Momjian <maillist@candle.pha.pa.us>
0 siblings, 1 reply; 7+ messages in thread
From: Thomas Lockhart @ 1999-07-30 00:30 UTC (permalink / raw)
To: Bruce Momjian <maillist@candle.pha.pa.us>; +Cc: pgsql-sql; Postgres Hackers List <hackers@postgreSQL.org>
> Thomas, please change the psql manual page to say -t turns off headings
> and the row count, and change -q to not mention turning off of row
> count, ok? I believe you are controlling the master manual pages
> copies.
Sure. Although I forgot to mention it explicitly, I've completed the
merge of the old man page info into the newer sgml pages. From here on
I'm just making small tweaks to get the man page stuff actually
working (have had to dive into perl code to get the cross references
to work).
So, feel free to touch those files yourself if you would like, but let
me know if you want me to do it.
- Thomas
--
Thomas Lockhart lockhart@alumni.caltech.edu
South Pasadena, California
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: [SQL] Formatting the output
@ 1999-07-30 00:42 Bruce Momjian <maillist@candle.pha.pa.us>
parent: Thomas Lockhart <lockhart@alumni.caltech.edu>
0 siblings, 0 replies; 7+ messages in thread
From: Bruce Momjian @ 1999-07-30 00:42 UTC (permalink / raw)
To: Thomas Lockhart <lockhart@alumni.caltech.edu>; +Cc: pgsql-sql; Postgres Hackers List <hackers@postgreSQL.org>
> > Thomas, please change the psql manual page to say -t turns off headings
> > and the row count, and change -q to not mention turning off of row
> > count, ok? I believe you are controlling the master manual pages
> > copies.
>
> Sure. Although I forgot to mention it explicitly, I've completed the
> merge of the old man page info into the newer sgml pages. From here on
> I'm just making small tweaks to get the man page stuff actually
> working (have had to dive into perl code to get the cross references
> to work).
>
> So, feel free to touch those files yourself if you would like, but let
> me know if you want me to do it.
No problem. Done.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~1999-07-30 00:42 UTC | newest]
Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-07-29 17:02 Formatting the output G. Anthony Reina <reina@nsi.edu>
1999-07-29 17:34 ` Bill Brandt <brandtwr-pgsql@draaw.net>
1999-07-29 18:37 ` G. Anthony Reina <reina@nsi.edu>
1999-07-29 17:41 ` Bruce Momjian <maillist@candle.pha.pa.us>
1999-07-29 17:43 ` Bruce Momjian <maillist@candle.pha.pa.us>
1999-07-30 00:30 ` Thomas Lockhart <lockhart@alumni.caltech.edu>
1999-07-30 00:42 ` Bruce Momjian <maillist@candle.pha.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox