X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 9ED2F3A4226 for ; Wed, 3 Nov 2004 03:46:28 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 97478-03 for ; Wed, 3 Nov 2004 03:46:23 +0000 (GMT) Received: from biglumber.com (biglumber.com [207.228.252.42]) by svr1.postgresql.org (Postfix) with SMTP id F33773A420D for ; Wed, 3 Nov 2004 03:46:25 +0000 (GMT) Received: (qmail 3477 invoked from network); 3 Nov 2004 03:46:23 -0000 Received: from unknown (HELO localhost) (207.228.252.42) by 0 with SMTP; 3 Nov 2004 03:46:23 -0000 From: "Greg Sabino Mullane" To: pgsql-sql@postgresql.org Subject: Re: 'show databases' in psql way? X-PGP-Key: 2529 DF6A B8F7 9407 E944 45B4 BC9B 9067 1496 4AC8 X-Request-PGP: http://www.biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 In-Reply-To: Date: Wed, 3 Nov 2004 03:46:23 -0000 X-Mailer: JoyMail 1.48 Message-ID: X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.3 tagged_above=0.0 required=5.0 tests=UPPERCASE_25_50 X-Spam-Level: X-Archive-Number: 200411/23 X-Sequence-Number: 19342 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 To be pedantic about it, use: SELECT pg_catalog.quote_ident(datname) AS database FROM pg_catalog.pg_database ORDER BY 1; or if using version 8 or higher: SELECT pg_catalog.quote_ident(datname) AS database, pg_catalog.quote_ident(spcname) AS tablespace FROM pg_catalog.pg_database JOIN pg_catalog.pg_tablespace t ON (dattablespace=t.oid) ORDER BY 1; - -- Greg Sabino Mullane greg@turnstep.com PGP Key: 0x14964AC8 200411022120 -----BEGIN PGP SIGNATURE----- iD8DBQFBiFTSvJuQZxSWSsgRApflAJ0RiVndbc6u//cXX/S7uM8K91lWbgCfYVbC MsRNWlP446AcvHm0UaGgEVo= =S8Ft -----END PGP SIGNATURE-----