Re: [HACKERS] Re: your mail

Поиск
Список
Период
Сортировка
От Thomas G. Lockhart
Тема Re: [HACKERS] Re: your mail
Дата
Msg-id 3504AD02.12001E3A@alumni.caltech.edu
обсуждение исходный текст
Ответ на Re: your mail  (Bruce Momjian <maillist@candle.pha.pa.us>)
Список pgsql-hackers
> >   It would be a good idea, IMHO, that if psql is called alone (without
> > database nor any parameter), instead of try to connect to database 'user'
> > starts interactively without connection.  Then, simple calling "\c dbname"
> > would connect the user to the desired database.  What you think?
> >   Cheers,
>
> This seems like a good idea.  Any comments?

Of course :) I personally like the current default behavior, and I think that
some others find it similarly convenient. If the alternate behavior is
desirable for some, how about implementing a command line switch which would
change the default behavior to "don't open anything". Then, you can alias the
definition of psql to get what you want.

I actually had a patch of some sort which changed the behavior of "\c
unknownDB"; at the moment if a connection fails psql bails out. The patch left
the psql session open and connected to the previous database. That behavior
would be dangerous in some cases so we didn't apply it; going to an
"unconnected state" would be more helpful and less dangerous.

                                                     - Tom


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: your mail
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] Heh, the disappearing problem!