From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Craig Ringer <craig(at)2ndquadrant(dot)com> |
Cc: | Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: psql --batch |
Date: | 2017-08-28 09:28:31 |
Message-ID: | CAFj8pRDmKVZFvc7T6MsrQJkqqZqWhVZGvVX8tPmOUeNwzmYWOA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2017-08-28 11:05 GMT+02:00 Craig Ringer <craig(at)2ndquadrant(dot)com>:
> On 28 August 2017 at 16:23, Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> wrote:
>
>>
>> This doesn't really address the original issue though, that it's far from
>>> obvious how to easily and correctly script psql.
>>>
>>
>> That is another interesting argument. I understood that the issue was
>> having to type these options, but now it is also to remember which one are
>> relevant and wanted, which is a little different and more justifiable as an
>> option.
>>
>> On that account, ISTM that '|' as a field separator is debatable, that
>> pager should be turned off... and maybe a few other things.
>>
>
>
> Good point re pager, though it's turned off automatically when stdout
> isn't a terminal, so in practice that'll only matter if you're using
> something like 'expect' that uses a pty. Still worth doing.
>
> I agree that | is a bit iffy, but so's anything really. null bytes aren't
> usable for all scripts, and nothing else cannot also be output in the data
> its self. No easy answers there. In cases where I expect that to be an
> issue I sometimes use \COPY ... TO STDOUT WITH (FORMAT CSV) though.
>
I don't doubt about a sense of this configuration - but this specific
combination depends on usage - so I don't think so using special option is
good idea.
Regards
Pavel
>
> --
> Craig Ringer http://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Training & Services
>
From | Date | Subject | |
---|---|---|---|
Next Message | Kyotaro HORIGUCHI | 2017-08-28 09:36:14 | Re: Restricting maximum keep segments by repslots |
Previous Message | Kyotaro HORIGUCHI | 2017-08-28 09:28:07 | Re: Race between SELECT and ALTER TABLE NO INHERIT |