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

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-27 Thread Pavel Stehule
Hello 2012/5/27 hubert depesz lubaczewski dep...@depesz.com: 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

[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 format

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 | 10 |

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

2012-05-26 Thread Pavel Stehule
2012/5/26 Bruce Momjian br...@momjian.us: 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 Tom Lane
Bruce Momjian br...@momjian.us 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

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

2012-05-26 Thread Pavel Stehule
2012/5/26 Tom Lane t...@sss.pgh.pa.us: Bruce Momjian br...@momjian.us 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.

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 br...@momjian.us 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

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 pavel.steh...@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!

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

2012-05-26 Thread Pavel Stehule
2012/5/26 Bruce Momjian br...@momjian.us: On Sat, May 26, 2012 at 12:43:40PM -0400, Tom Lane wrote: Bruce Momjian br...@momjian.us 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

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 jbg...@lug-owl.de: Hi! On Sat, 2012-05-26 17:39:23 +0200, Pavel Stehule pavel.steh...@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

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 pavel.steh...@gmail.com wrote: 2012/5/26 Tom Lane t...@sss.pgh.pa.us: Bruce Momjian br...@momjian.us 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

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: