X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 099AED1B991 for ; Sat, 15 Nov 2003 04:36:50 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 43351-10 for ; Sat, 15 Nov 2003 00:36:18 -0400 (AST) Received: from web21405.mail.yahoo.com (web21405.mail.yahoo.com [216.136.232.75]) by svr1.postgresql.org (Postfix) with SMTP id A0A77D1B4E8 for ; Sat, 15 Nov 2003 00:36:17 -0400 (AST) Message-ID: <20031115043616.90388.qmail@web21405.mail.yahoo.com> Received: from [64.81.205.234] by web21405.mail.yahoo.com via HTTP; Fri, 14 Nov 2003 20:36:16 PST Date: Fri, 14 Nov 2003 20:36:16 -0800 (PST) From: ow Subject: Programatically switching database To: pgsql-sql@postgresql.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/164 X-Sequence-Number: 15979 Hi, Suppose pgSql server is running databases "db1" and "db2" that are in the same db cluster. A client app establishes connection "conn1" to db1. Is there a way to programatically switch conn1 to use db2 without doing disconnect-from-db1-connect-to-db2? Something like what "\c" does but to be used independently from psql? I need this to be able to reuse a pool of connections to db1 for actions on db1, db2 ... dbn. Thanks __________________________________ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree