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

From Abel Abraham Camarillo Ojeda
Subject Re: VIP: new format for psql - shell - simple using psql in shell
Date
Msg-id CAPD=2Ng1pMykpceJEr1X=Bp-KuuSF5uM4NhnOcp+k1f6pXOZVw@mail.gmail.com
Whole thread Raw
In response to Re: 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
On Sat, May 26, 2012 at 11:50 AM, Pavel Stehule <pavel.stehule@gmail.com> wrote:
> 2012/5/26 Tom Lane <tgl@sss.pgh.pa.us>:
>> Bruce Momjian <bruce@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 encourage that style of
>> programming.  The most charitable prediction of performance is that it
>> would suck --- not only do you have all the inefficiencies inherent in
>> row-by-row result processing with a shell script, but you're forcing a
>> separate database connection for each query.  And I don't actually see
>> where it would be especially convenient to use, compared to say perl
>> or python or other scripting languages.  I'd rather see us worrying
>> about the convenience of cases like
>>
>>        psql ... | perl -e ...
>
> A performance is not important in this case - typical use case for
> this feature are simple tasks - some simple maintaining - where people
> can prepare SQL in psql, and later can reuse knowledge in some simple
> scripts. Shell has one significant advantage against perl or python -
> is everywhere (on UNIX) and it is best for very simple tasks.
>
> Regards
>
> Pavel
>
>
>
>>
>>                        regards, tom lane
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers

bash isn't everywhere (on UNIX)...


pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: VIP: new format for psql - shell - simple using psql in shell
Next
From: Pavel Stehule
Date:
Subject: Re: VIP: new format for psql - shell - simple using psql in shell