Re: VIP: new format for psql - shell - simple using psql in shell - Mailing list pgsql-hackers

From Jan-Benedict Glaw
Subject Re: VIP: new format for psql - shell - simple using psql in shell
Date
Msg-id 20120526185741.GG27648@lug-owl.de
Whole thread Raw
In response to VIP: new format for psql - shell - simple using psql in shell  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: VIP: new format for psql - shell - simple using psql in shell
List pgsql-hackers
Hi!

On Sat, 2012-05-26 17:39:23 +0200, Pavel Stehule <pavel.stehule@gmail.com> wrote:
> postgres=# select * from foo;
[...]
> postgres=# \pset format shell
> Output format is shell.
> postgres=# select * from foo;
> a b c
> Hello,\ World 10 2012-05-26
> Ahoj,\ Svete 20 2012-06-15
[...]

I like that idea!  Up to now, I basically used IFS='|' with
tuples-only, but it's not clean wrt. '\n' within the data.

I didn't check your patch if it gets this "right", but if it does, it
would ease daily work (where I check for '\n' in the data beforehand
and abort...)

MfG, JBG

--      Jan-Benedict Glaw      jbglaw@lug-owl.de              +49-172-7608481
Signature of:              Fortschritt bedeutet, einen Schritt so zu machen,
the second  :                   daß man den nächsten auch noch machen kann.

pgsql-hackers by date:

Previous
From: Greg Sabino Mullane
Date:
Subject: Re: Backends stalled in 'startup' state: index corruption
Next
From: Tom Lane
Date:
Subject: Synchronized scans versus relcache reinitialization