Re: [PATCHES] psql patch: new host/port without leaving session

2006-04-02 Thread Volkan YAZICI
On Apr 01 07:07, Neil Conway wrote: One question about behavior: in the attached patch, omitting an argument to \connect or specifying - are treated equivalently -- the value for that parameter from the previous connection is used, otherwise NULL (for the libpq default). Is this what people

Re: [PATCHES] psql patch: new host/port without leaving session

2006-04-02 Thread Tom Lane
Volkan YAZICI [EMAIL PROTECTED] writes: On Apr 01 07:07, Neil Conway wrote: One question about behavior: in the attached patch, omitting an argument to \connect or specifying - are treated equivalently -- the value for that parameter from the previous connection is used, otherwise NULL (for

Re: [PATCHES] psql patch: new host/port without leaving session

2006-04-02 Thread Volkan YAZICI
On Apr 02 12:37, Tom Lane wrote: Volkan YAZICI [EMAIL PROTECTED] writes: Won't it be better if we distinguish between default and current value of a parameter with '-' (for the current) and '+' (for the default) characters? For example: That seems like a frammish without sufficient

Re: [PATCHES] psql patch: new host/port without leaving session

2006-04-02 Thread Neil Conway
On Sun, 2006-04-02 at 12:37 -0400, Tom Lane wrote: That seems like a frammish without sufficient use-case. You can always quit and restart psql to get back to the defaults. Patch applied to HEAD. If folks want to argue for the ability to instruct psql to use the libpq default for a parameter,

Re: [PATCHES] psql patch: new host/port without leaving session

2006-04-02 Thread Bruce Momjian
Neil Conway wrote: On Sun, 2006-04-02 at 12:37 -0400, Tom Lane wrote: That seems like a frammish without sufficient use-case. You can always quit and restart psql to get back to the defaults. Patch applied to HEAD. If folks want to argue for the ability to instruct psql to use the

Re: [PATCHES] psql patch: new host/port without leaving session

2006-04-01 Thread Neil Conway
On Sun, 2006-03-12 at 19:59 +0200, Volkan YAZICI wrote: I've written do_connect() and \c handling part from scratch in the attached patch. Attached is a revised version of this patch. I rewrote most of the code, because the existing stuff was in pretty bad style IMHO. I haven't updated the

Re: [PATCHES] psql patch: new host/port without leaving session

2006-03-12 Thread Volkan YAZICI
Hi, I've written do_connect() and \c handling part from scratch in the attached patch. Here are some features introduced: - \c syntax is extended. (See comment lines just above \c stuff.) - do_connect() AI (like used for prompting password or informing client about connect attempt's

Re: [PATCHES] psql patch: new host/port without leaving session

2006-02-11 Thread Bruce Momjian
Patch applied. Thanks. --- David Fetter wrote: Folks, Please find enclosed a patch that lets you use \c to connect (optionally) to a new host and port without exiting psql. This eliminates, IMHO, a surprise in that