> * when \connect fails, it now keeps the previous connection (formerly
>   aborted program)

This was the behavior at one time, but it was regarded as very dangerous
and thus changed to the current behavior.

The problem was, that scripts would do things to the wrong database if a
connect failed.

The ultimate solution would be an unconnected state, where only
\connect or help commands would be accepted.

Andreas

Wed, 6 Oct 1999 10:33:00 +0200 
Zeugswetter Andreas IZ5 <ZeugswetterA@wien.spardat.at>
AW: [HACKERS] psql Week 1
On Oct 6, Zeugswetter Andreas IZ5 mentioned:

> > * when \connect fails, it now keeps the previous connection (formerly
> >   aborted program)
> 
> This was the behavior at one time, but it was regarded as very dangerous
> and thus changed to the current behavior.
> 
> The problem was, that scripts would do things to the wrong database if a
> connect failed.

See earlier response. Only in interactive mode. The idea was that a typo
should not bomb you out of the program.

> The ultimate solution would be an unconnected state, where only
> \connect or help commands would be accepted.

I had that idea, too, but that would open a whole new can of worms
code-wise. Can you guys out there comment if this feature would be
desirable?

-- 
Peter Eisentraut - peter_e@gmx.net
http://yi.org/peter-e/


Wed, 6 Oct 1999 18:34:37 +0200 (CEST)
Peter Eisentraut <peter_e@gmx.net>
Re: AW: [HACKERS] psql Week 1