X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 660639FA491 for ; Wed, 2 Aug 2006 13:23:13 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 65901-06 for ; Wed, 2 Aug 2006 13:23:05 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from exchange.g2switchworks.com (mail.g2switchworks.com [63.87.162.25]) by postgresql.org (Postfix) with ESMTP id 215CF9F9B01 for ; Wed, 2 Aug 2006 13:23:05 -0300 (ADT) Received: from 10.10.1.37 ([10.10.1.37]) by exchange.g2switchworks.com ([10.10.1.2]) with Microsoft Exchange Server HTTP-DAV ; Wed, 2 Aug 2006 16:22:54 +0000 Received: from state.g2switchworks.com by mail.g2switchworks.com; 02 Aug 2006 11:22:54 -0500 Subject: Re: viewing the description of tables from python DB-API From: Scott Marlowe To: Rodrigo De Leon Cc: pgsql-sql@postgresql.org In-Reply-To: References: <20060801223740.4B60E9FB1D4@postgresql.org> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1154535774.7882.42.camel@state.g2switchworks.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Wed, 02 Aug 2006 11:22:54 -0500 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.07 tagged_above=0 required=5 tests=AWL, SPF_PASS, UNPARSEABLE_RELAY X-Spam-Level: X-Archive-Number: 200608/17 X-Sequence-Number: 25975 On Tue, 2006-08-01 at 18:14, Rodrigo De Leon wrote: > On 8/1/06, Daniel Joo wrote: > > Hi all, > > > > > > > > Is there a way to view the list of all tables from python (or any other > > languages for that matter) DB-API? What I'm looking for is a command > > similar to the meta-command '\d' that works with the psql client. > > > > > > > > Thanks very much! > > > > > > > > Dan > > There's also the INFORMATION_SCHEMA: > > http://www.postgresql.org/docs/8.1/static/information-schema.html Quick note. The INFORMATION_SCHEMA should stay pretty static from one pgsql version to the next, while the queries that psql -E shows will likely change from one version to another.