Re: feature request: auto savepoint for interactive psql when in transaction.

Поиск
Список
Период
Сортировка
От Daniel Farina
Тема Re: feature request: auto savepoint for interactive psql when in transaction.
Дата
Msg-id CAAZKuFas67WfHse1F4JeS5_4WdEL0jXYP2hxjbWRyC4_tTF2cA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: feature request: auto savepoint for interactive psql when in transaction.  (Ross Reedstrom <reedstrm@rice.edu>)
Список pgsql-hackers
On Mon, Nov 14, 2011 at 3:05 PM, Ross Reedstrom <reedstrm@rice.edu> wrote:
> On Mon, Nov 14, 2011 at 02:45:04PM -0800, Will Leinweber wrote:
>> My coworker Dan suggested that some people copy and paste scripts. However
>> I feel that that is an orthogonal problem and if there is a very high rate
>> of input psql should detect that and turn interactive off. And I
>> still strongly feel that on_error_rollback=interactive should be the
>> default.
>
> Hmm, I think that falls under the "don't so that, then" usecase. I've been
> known to c&p the occasional script - I guess the concern here would be not
> seeing failed steps that scrolled off the terminal. (I set my scrollback to
> basically infinity and actaully use it, but then I'm strange that way :-) )

I do this and have done this all the time.  Because emacs.  On the
other hand, I only really do it in line-buffered modes.  I also feel
there is something of a development/production parity that is broken
by this, but then again, so are backslash commands interpreted by
psql, and that has never proven to be a practical problem.  That I know of.

I wouldn't let my particular use case (M-x shell) get in the way of
changing the default if that was the consensus because I think this
would help a lot more people than hurt.  In the discoverability
department, one can not-hack the server error message by having psql
emit its own hint when it receives an error while in a transaction
block (vs auto-commit).  This is knowable via the ReadyForQuery
message, which can tell you "idle in transaction".

-- 
fdr



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

Предыдущее
От: "Etsuro Fujita"
Дата:
Сообщение: Re: Don't allow relative path for copy from file
Следующее
От: Marti Raudsepp
Дата:
Сообщение: UNION ALL with WHERE clause does not use Merge Append