Re: [HACKERS] VIP: new format for psql - shell - simple using psql in shell

2012-06-04 Thread Jim Nasby
On 5/26/12 10:16 PM, Pavel Stehule wrote: My idea is secure to separator - because separator is just space and new line and these symbols are escaped. ISTM it'd be a really good idea to support something other than space, since presumably that'd be trivial. I'm not a fan of supporting the arr

Re: [HACKERS] VIP: new format for psql - shell - simple using psql in shell

2012-05-27 Thread Pavel Stehule
Hello 2012/5/27 hubert depesz lubaczewski : > On Sat, May 26, 2012 at 05:39:23PM +0200, Pavel Stehule wrote: >> I proposed new psql's format "shell". This format is optimized for >> processing returned result in shell: > > While I generally like the idea, please note that safe reading output > fro

Re: [HACKERS] VIP: new format for psql - shell - simple using psql in shell

2012-05-27 Thread hubert depesz lubaczewski
On Sat, May 26, 2012 at 05:39:23PM +0200, Pavel Stehule wrote: > I proposed new psql's format "shell". This format is optimized for > processing returned result in shell: While I generally like the idea, please note that safe reading output from queries is possible, with COPY, and proper IFS, like

Re: [HACKERS] VIP: new format for psql - shell - simple using psql in shell

2012-05-26 Thread Pavel Stehule
> > bash isn't everywhere (on UNIX)... it is true - but first format - space is used as separator and space is escaped should be processed on every shell. Regards Pavel -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgr

Re: [HACKERS] VIP: new format for psql - shell - simple using psql in shell

2012-05-26 Thread Abel Abraham Camarillo Ojeda
On Sat, May 26, 2012 at 11:50 AM, Pavel Stehule wrote: > 2012/5/26 Tom Lane : >> Bruce Momjian writes: >>> On Sat, May 26, 2012 at 05:39:23PM +0200, Pavel Stehule wrote: I proposed new psql's format "shell". This format is optimized for processing returned result in shell: >> >>> I am u

Re: [HACKERS] VIP: new format for psql - shell - simple using psql in shell

2012-05-26 Thread Pavel Stehule
2012/5/26 Jan-Benedict Glaw : > Hi! > > On Sat, 2012-05-26 17:39:23 +0200, Pavel Stehule > 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-0

Re: [HACKERS] VIP: new format for psql - shell - simple using psql in shell

2012-05-26 Thread Pavel Stehule
2012/5/26 Bruce Momjian : > On Sat, May 26, 2012 at 12:43:40PM -0400, Tom Lane wrote: >> Bruce Momjian writes: >> > On Sat, May 26, 2012 at 05:39:23PM +0200, Pavel Stehule wrote: >> >> I proposed new psql's format "shell". This format is optimized for >> >> processing returned result in shell: >>

Re: [HACKERS] VIP: new format for psql - shell - simple using psql in shell

2012-05-26 Thread Jan-Benedict Glaw
Hi! On Sat, 2012-05-26 17:39:23 +0200, Pavel Stehule 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 ba

Re: [HACKERS] VIP: new format for psql - shell - simple using psql in shell

2012-05-26 Thread Bruce Momjian
On Sat, May 26, 2012 at 12:43:40PM -0400, Tom Lane wrote: > Bruce Momjian writes: > > On Sat, May 26, 2012 at 05:39:23PM +0200, Pavel Stehule wrote: > >> I proposed new psql's format "shell". This format is optimized for > >> processing returned result in shell: > > > I am unclear exactly how thi

Re: [HACKERS] VIP: new format for psql - shell - simple using psql in shell

2012-05-26 Thread Pavel Stehule
2012/5/26 Tom Lane : > Bruce Momjian writes: >> On Sat, May 26, 2012 at 05:39:23PM +0200, Pavel Stehule wrote: >>> I proposed new psql's format "shell". This format is optimized for >>> processing returned result in shell: > >> I am unclear exactly how this relates to shells. > > What I'm unclear

Re: [HACKERS] VIP: new format for psql - shell - simple using psql in shell

2012-05-26 Thread Tom Lane
Bruce Momjian writes: > On Sat, May 26, 2012 at 05:39:23PM +0200, Pavel Stehule wrote: >> I proposed new psql's format "shell". This format is optimized for >> processing returned result in shell: > I am unclear exactly how this relates to shells. What I'm unclear on is why we'd want to encourag

Re: [HACKERS] VIP: new format for psql - shell - simple using psql in shell

2012-05-26 Thread Pavel Stehule
2012/5/26 Bruce Momjian : > On Sat, May 26, 2012 at 05:39:23PM +0200, Pavel Stehule wrote: >> Hello >> >> I proposed new psql's format "shell". This format is optimized for >> processing returned result in shell: >> >> >> postgres=# select * from foo; >>       a       | b  |     c >> --

Re: [HACKERS] VIP: new format for psql - shell - simple using psql in shell

2012-05-26 Thread Bruce Momjian
On Sat, May 26, 2012 at 05:39:23PM +0200, Pavel Stehule wrote: > Hello > > I proposed new psql's format "shell". This format is optimized for > processing returned result in shell: > > > postgres=# select * from foo; > a | b | c > --++ > Hello, World

[HACKERS] VIP: new format for psql - shell - simple using psql in shell

2012-05-26 Thread Pavel Stehule
Hello I proposed new psql's format "shell". This format is optimized for processing returned result in shell: postgres=# select * from foo; a | b | c --++ Hello, World | 10 | 2012-05-26 Ahoj, Svete | 20 | 2012-06-15 (2 rows) postgres=# \pset forma