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 63EB63A3E77 for ; Tue, 2 Nov 2004 15:39:49 +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 86919-05 for ; Tue, 2 Nov 2004 15:39:43 +0000 (GMT) Received: from cbc.ca (gwtor-out.cbc.ca [159.33.1.177]) by svr1.postgresql.org (Postfix) with ESMTP id 507B33A3E5E for ; Tue, 2 Nov 2004 15:39:46 +0000 (GMT) Received: from GWIADMOUT-MTA by cbc.ca with Novell_GroupWise; Tue, 02 Nov 2004 10:37:46 -0500 Message-Id: X-Mailer: Novell GroupWise Internet Agent 6.5.2 Date: Tue, 02 Nov 2004 10:03:40 -0500 From: "Arash Zaryoun" To: , Cc: , Subject: Re: 'show databases' in psql way? Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200411/18 X-Sequence-Number: 19337 in command line: psql template1 pgsql -l in PSQL: foodb=3D#> select datname from pg_database; - Arash >>> Achilleus Mantzios 11/2/2004 10:21:06 = AM >>> O lorid ****** **** Nov 2, 2004 : > \z will list the tables in the dbase > \d tablename will list the columns in the table >=20 or=20 foodb=3D# SELECT oid,* from pg_database ; > --------------------- > Erik Wasser wrote: >=20 > >Hi list, > > > >how can I list the databases in a postgresish way? I know about the = '-l'=20 > >switch of 'psql' but is there a DBI/SQL-query way? I don't want to = call=20 > >an external program only to list the databases. I've googled about = this=20 > >problem but I only found the '-l'-way to this this. > > > >Ideas? Solutions? > > > > =20 > > >=20 >=20 > ---------------------------(end of broadcast)--------------------------- > TIP 5: Have you checked our extensive FAQ? >=20 > http://www.postgresql.org/docs/faqs/FAQ.html=20 >=20 --=20 -Achilleus ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html