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+TgmoY1fsDq8X__ucuhuGhxT826+Yj2QN5OaVf0yMgFHZ5wZw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [PATCH] Make "psql -1 < file.sql" work as with "-f"  (David Fetter <david@fetter.org>)
Ответы Re: [PATCH] Make "psql -1 < file.sql" work as with "-f"
Re: [PATCH] Make "psql -1 < file.sql" work as with "-f"
Список pgsql-hackers
On Wed, Aug 8, 2012 at 6:50 PM, David Fetter <david@fetter.org> wrote:
>> 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.
>
> +1 for this.

OK, done.

I had to revise the original patch pretty heavily before committing;
the original patch assumed that it was OK to make psql -1 <file go
through process_file() while having psql -1 <file still go through
MainLoop() directly.  This isn't a good idea, because that means that
any other behavioral differences between process_file() and MainLoop()
will be contingent on whether -1 is used, which is not what we want.
And there is at least one such difference that matters: whether or not
the file and line number get prepended when emitting error messages.

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


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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: [WIP] Performance Improvement by reducing WAL for Update Operation
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: [WIP] Performance Improvement by reducing WAL for Update Operation