From: | Merlin Moncure <mmoncure(at)gmail(dot)com> |
---|---|
To: | Sim Zacks <sim(at)compulab(dot)co(dot)il> |
Cc: | PostgreSQL general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: thoughts on interactive query |
Date: | 2011-06-14 15:00:54 |
Message-ID: | BANLkTikuksDF2LA2v4X1cfpK5nBRwGysjQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, Jun 14, 2011 at 2:39 AM, Sim Zacks <sim(at)compulab(dot)co(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2011-06-14 15:05:49 | Re: psql reports back wrong number of affected rows. |
Previous Message | Merlin Moncure | 2011-06-14 14:55:08 | Re: duplicate key violate error |