From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
Cc: | Shane Ambler <pgsql(at)Sheeky(dot)Biz>, Gregory Stark <stark(at)enterprisedb(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Concurrent psql API |
Date: | 2008-04-09 17:27:57 |
Message-ID: | 22528.1207762077@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> Shane Ambler wrote:
>> So I am thinking something like C-z that will allow you to switch out of
>> a task that is waiting for results without having to stop it with C-c.
> I agree -- we would need to have a mode on which it is "not on any
> connection", to which we could switch on C-z. If all connections are
> busy, there's no way to create a new one otherwise.
That would work okay for interactive use and not at all for scripts,
which makes it kind of a nonstarter. I'm far from convinced that the
case must be handled anyway. If you fat-finger a SQL command the
consequences are likely to be far worse than having to wait a bit,
so why is it so critical to be able to recover from a typo in a \join
argument?
(I'm also unconvinced that there won't be severe implementation
difficulties in supporting a control-Z-like interrupt --- we don't have
any terminal signals left to use AFAIK. And what about Windows?)
> It makes sense if we continue with the shell analogy: the shell prompt
> is not any particular task. Either there is a task running in
> foreground (in which case we have no prompt, but we can press C-z to
> suspend the current task and get a prompt), or there isn't (in which
> case we have a prompt.)
This is nonsense. When you have a shell prompt, you are connected to a
shell that will take a command right now.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Chernow | 2008-04-09 17:29:48 | Re: [PATCHES] libpq type system 0.9a |
Previous Message | Pavan Deolasee | 2008-04-09 17:27:09 | Re: Segfault using heap_form_tuple |
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Chernow | 2008-04-09 17:29:48 | Re: [PATCHES] libpq type system 0.9a |
Previous Message | Magnus Hagander | 2008-04-09 17:18:54 | Fix for win32 stat() problems |