Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 0B8B56339D3; Tue, 3 Nov 2009 14:29:22 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 72115-09; Tue, 3 Nov 2009 18:29:09 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-bw0-f213.google.com (mail-bw0-f213.google.com [209.85.218.213]) by mail.postgresql.org (Postfix) with ESMTP id 7878C633918; Tue, 3 Nov 2009 14:29:10 -0400 (AST) Received: by bwz5 with SMTP id 5so8098381bwz.3 for ; Tue, 03 Nov 2009 10:29:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=Tf61UdqN+Wdzp6QY+KWlKtcRglBy5UujEtff5+zCvqE=; b=jwK+E7wcf3vBbJf1yTVkTHsKPGWRxKIZk5BAoHeoNetGVzkRu/RvOSBghEfAiCxrXC RtWqT9tIBg6XU64ZI0Uw+pEL/I/d06WCmBeUlFBJcXa69uXvWTJJOkyR29r0rkp6yFFv t3IVeTwrPv2TJPnKCn0q06m/LRsBxO+zsvK/8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=j9ZeT0hnoQRxKYGZSIqidLOItm6eIvNi/qIFC1GfXQdlb68MiMcWU7k2Oxilih7mt4 Z0xhpXBxRvKhsm/iQgDH3WFRe3fbKl0ywKcsOeMYMNclRLCBwLNw84RTr90aVISGmu44 fYPbnSrGH40pUUh30xiAr9mAYmqYiv2UlAktQ= MIME-Version: 1.0 Received: by 10.223.5.18 with SMTP id 18mr49187fat.58.1257272948420; Tue, 03 Nov 2009 10:29:08 -0800 (PST) In-Reply-To: <396486430911030936r725f6163m3384fad30721b36c@mail.gmail.com> References: <396486430911030936r725f6163m3384fad30721b36c@mail.gmail.com> Date: Tue, 3 Nov 2009 20:29:08 +0200 Message-ID: <5a8aa6680911031029q1d8e592fj90f47f1b25e62bf8@mail.gmail.com> Subject: Re: [NOVICE] Bug - DatabaseMetaData.getCatalogs() was [Novice] Can't get list of databases with \list From: Michael Wood To: Richard Broersma Cc: Christopher Frank , pgsql-novice@postgresql.org, pgsql-jdbc Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.444 tagged_above=-10 required=5 tests=AWL=0.155, BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 200911/5 X-Sequence-Number: 20052 2009/11/3 Richard Broersma : > On Mon, Nov 2, 2009 at 1:05 PM, Christopher Frank wrote: > >>> > As for JDBC, there may be something that gives equivalent information, >>> > but I >>> > couldn't find it. >>> >>> http://java.sun.com/javase/6/docs/api/java/sql/DatabaseMetaData.html >>> >>> getCatalogs() > >> I had tried that but it only returned one database, the database to which I >> was already connected. There should have been 3 others. > > I verified that the DatabaseMetaData.getCatalogs() only returns a > ResultSet with the currently connect database rather than all of the > databases in the PostgreSQL cluster. What does it do when you have multiple schemas (schemata?) in the database? -- Michael Wood