X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id A25DD11F6271 for ; Wed, 29 Mar 2006 23:19:53 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 84481-01 for ; Wed, 29 Mar 2006 23:19:53 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 5279511F6263 for ; Wed, 29 Mar 2006 23:19:51 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k2U3JpxT009242; Wed, 29 Mar 2006 22:19:51 -0500 (EST) To: Philip Yarra cc: pgsql-hackers@postgresql.org Subject: Re: psql \c error In-reply-to: <200603301120.09969.philip@utiba.com> References: <200603301120.09969.philip@utiba.com> Comments: In-reply-to Philip Yarra message dated "Thu, 30 Mar 2006 11:20:09 +1000" Date: Wed, 29 Mar 2006 22:19:51 -0500 Message-ID: <9241.1143688791@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.114 required=5 tests=[AWL=0.114] X-Spam-Score: 0.114 X-Spam-Level: X-Archive-Number: 200603/1255 X-Sequence-Number: 81653 Philip Yarra writes: > Hi folks, I've found that CVS HEAD psql's \c doesn't quite behave as > expected Yeah, there were complaints about this already. I think the problem was introduced by this patch: 2006-02-11 21:54 momjian * doc/src/sgml/ref/psql-ref.sgml, src/bin/psql/command.c, src/bin/psql/help.c: 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 you can now connect to PostgreSQL on a differnt machine from the one where you started your session. This should help people who use psql as an administrative tool. David Fetter The patch seems not to behave very reasonably with respect to preserving prior values for the newly-changeable connection parameters. I haven't got time to look into it myself right now though --- do you want to? regards, tom lane