Re: thoughts on interactive query

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: thoughts on interactive query
Дата
Msg-id BANLkTikuksDF2LA2v4X1cfpK5nBRwGysjQ@mail.gmail.com
обсуждение исходный текст
Ответ на thoughts on interactive query  (Sim Zacks <sim@compulab.co.il>)
Список pgsql-general
On Tue, Jun 14, 2011 at 2:39 AM, Sim Zacks <sim@compulab.co.il> wrote:
> I am playing around with making interactive queries and was wondering if
> anyone had any comments.
>
> If your comment is "That is a stupid idea", please try to qualify that with
> something constructive as well.
>
>
> The idea is that sometimes during a process, user input is required. The way
> we have been doing this is to  return an error code and then the GUI asks
> the user the question and restarts the query with the answer passed as a
> parameter.
>
>
> The problem with this is that it is sometimes a long, complicated
> transaction and ending it in the middle just to ask the user "yes or no" and
> then running the entire transaction again seems awfully inefficient.

It's widely considered bad mojo to bock a transaction while waiting on
input.  I completely agree with this, and all else aside I think that
even if your idea could be made to work it encourages bad behaviors.
Gather all your answers before running your query (and if that can't
be done, your question is too complicated).

merlin

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

Предыдущее
От: Merlin Moncure
Дата:
Сообщение: Re: duplicate key violate error
Следующее
От: Tom Lane
Дата:
Сообщение: Re: psql reports back wrong number of affected rows.