Re: [SQL] Formatting the output - Mailing list pgsql-sql

From G. Anthony Reina
Subject Re: [SQL] Formatting the output
Date
Msg-id 37A09F65.CCE4770A@nsi.edu
Whole thread Raw
In response to Formatting the output  ("G. Anthony Reina" <reina@nsi.edu>)
List pgsql-sql
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




pgsql-sql by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [SQL] Formatting the output
Next
From: Thomas Lockhart
Date:
Subject: Re: [SQL] Formatting the output