Re: [PATCH] Make "psql -1 < file.sql" work as with "-f"

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: [PATCH] Make "psql -1 < file.sql" work as with "-f"
Дата
Msg-id CA+TgmoaYzAbrObqd9x7LfudC=3mo8tB6j_5qheSe0U6LQqjjfg@mail.gmail.com
обсуждение исходный текст
Ответ на [PATCH] Make "psql -1 < file.sql" work as with "-f"  (Fabien COELHO <coelho@cri.ensmp.fr>)
Ответы Re: [PATCH] Make "psql -1 < file.sql" work as with "-f"
Список pgsql-hackers
On Wed, Aug 1, 2012 at 4:28 AM, Fabien COELHO <coelho@cri.ensmp.fr> wrote:
> Dear PostgreSQL developers,
>
> Plese find attached a patch so that:
>
>     Make "psql -1 < file.sql" work as with "-f"
>
>     Make psql --single-transaction option work on a non-interactive
>     standard input as well, so that "psql -1 < input.sql" behaves as
>     "psql -1 -f input.sql".
>
> This saner/less error-prone behavior was discussed in this thread back in
> June:
>
>         http://archives.postgresql.org/pgsql-hackers/2012-06/msg00785.php
>
> I have tested it manually and it works for me. I'm not sure this is the best
> possible implementation, but it is a small diff one. I haven't found a place
> in the regression tests where "psql" could be tested with different options.
> Did I miss something?

I'm wondering if perhaps -- in addition to what you've done here -- we
should make "psql -1" error out if reading from a terminal.

Because accepting options that are intended to cause important
behavior changes and then ignoring those options is Bad.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Alexander Korotkov
Дата:
Сообщение: Re: Statistics and selectivity estimation for ranges
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: -Wformat-zero-length