pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
field sep in psql
2+ messages / 2 participants
[nested] [flat]

* field sep in psql
@ 2000-08-03 11:00 Ulf Mehlig <umehlig@uni-bremen.de>
  2000-08-03 11:38 ` Re: field sep in psql Rolf Lüttecke <rolf.luettecke@michael-telecom.de>
  0 siblings, 1 reply; 2+ messages in thread

From: Ulf Mehlig @ 2000-08-03 11:00 UTC (permalink / raw)
  To: pgsql-interfaces

Hello out there,

I'm not able to set the field separator in psql, not by "\f", nor by
"-F" (strange thing, I know it worked some months ago):

- [using i386 Linux 2.2.15] ------------------------------------------
 
   $ psql --version
   psql (PostgreSQL) 7.0.2
   contains readline, history support
   [...] 

   $ psql -F ' '
   Welcome to psql, the PostgreSQL interactive terminal.
   [...]

   db=# \f
   Field separator is ' '.
   db=# select * from something;      
    xxx |        yyy        
   -----+------------
      0 | some_data
      1 | other_data
   [...]
   (17 rows)
----------------------------------------------------------------------

Do you have any suggestions? BTW, I think it would be useful to have
an option to separately turn off the "(x rows)" line -- this is hardly
ever useful if you want to export data to another program, but the
table headers sometimes are (so you cannot use "\t"). Equally, in my
opinion there could be an option to switch off the pretty ASCII-art
line separating the table header from the table data. Of course, you
can filter output through a clean-up script (that's what I do as long
as the separator remains '|').

Thank you for your attention,
Ulf

-- 
======================================================================
Ulf Mehlig    <ulf.mehlig@zmt.uni-bremen.de>
              Center for Tropical Marine Ecology/ZMT, Bremen, Germany
----------------------------------------------------------------------



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: field sep in psql
  2000-08-03 11:00 field sep in psql Ulf Mehlig <umehlig@uni-bremen.de>
@ 2000-08-03 11:38 ` Rolf Lüttecke <rolf.luettecke@michael-telecom.de>
  0 siblings, 0 replies; 2+ messages in thread

From: Rolf Lüttecke @ 2000-08-03 11:38 UTC (permalink / raw)
  To: pgsql-interfaces

Hi Ulf,

Try \pset tuples_only
    \pset border 0
    \pset fieldsep ' '

select * from something;
  0   some_data
  1   other_data
[...]
(X rows)

Hope it helps
Rolf



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2000-08-03 11:38 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-08-03 11:00 field sep in psql Ulf Mehlig <umehlig@uni-bremen.de>
2000-08-03 11:38 ` Rolf Lüttecke <rolf.luettecke@michael-telecom.de>

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