Removing -'s (header) before records in psql

Started by CSNover 20 years ago3 messagesgeneral
Jump to latest
#1CSN
cool_screen_name90001@yahoo.com

Is it possible to get rid of the "header" of -'s when
selecting rows in psql? For fields with a lot of text,
it looks like:

select body from news where id=123;
-[ RECORD 1
]-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------
-------------------------------------------------------------------------------------------------------------------------------------------------------------
body | Additional details ...

Thanks,
CSN

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

#2Brent Wood
b.wood@niwa.co.nz
In reply to: CSN (#1)
Re: Removing -'s (header) before records in psql

On Sun, 14 Aug 2005, CSN wrote:

Is it possible to get rid of the "header" of -'s when
selecting rows in psql? For fields with a lot of text,
it looks like:

All I'm familiar with is \t which will return only tuples, so you'll lose
the headings as well.

Otherwise pipe through sed/head/tail to filter appropriately?

Brent Wood

select body from news where id=123;
-[ RECORD 1
]--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------!

---

--------
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------!

---

--------
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------!

---

Show quoted text

--------
-------------------------------------------------------------------------------------------------------------------------------------------------------------
body | Additional details ...

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: CSN (#1)
Re: Removing -'s (header) before records in psql

CSN <cool_screen_name90001@yahoo.com> writes:

Is it possible to get rid of the "header" of -'s when
selecting rows in psql? For fields with a lot of text,
it looks like:

Yeah, I believe so. Read the psql man page --- there's doubtless
a command line switch and/or \pset option for this.

regards, tom lane