X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 9CEF2DA548 for ; Thu, 22 Sep 2005 07:54:31 -0300 (ADT) 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 25300-01 for ; Thu, 22 Sep 2005 10:54:25 +0000 (GMT) Received: from ucsns.ucs.co.za (ucsns.ucs.co.za [196.23.43.2]) by svr1.postgresql.org (Postfix) with ESMTP id 27A02D83D0 for ; Thu, 22 Sep 2005 07:54:25 -0300 (ADT) Received: from ucspost.ucs.co.za (mailgw1.ucs.co.za [196.23.43.253]) by ucsns.ucs.co.za (Postfix) with ESMTP id 9D6992BD44; Thu, 22 Sep 2005 12:54:27 +0200 (SAST) Received: from jhb.ucs.co.za (jhb.ucs.co.za [172.31.1.3]) by ucspost.ucs.co.za (Postfix) with ESMTP id 82D02D9F62; Thu, 22 Sep 2005 12:54:27 +0200 (SAST) Received: from svb.ucs.co.za (svb.ucs.co.za [172.31.1.148]) by jhb.ucs.co.za (Postfix) with ESMTP id 88C41977C4; Thu, 22 Sep 2005 12:54:27 +0200 (SAST) Date: Thu, 22 Sep 2005 12:54:27 +0200 From: Stef To: "sandhya" Cc: "postgre" Subject: Re: Reg: sql commands Message-ID: <20050922125427.1e60e1df@svb.ucs.co.za> In-Reply-To: <014101c5bf61$2bb37000$cd00000a@amiindiahjwbgh> References: <012401c5bf5a$b06b48b0$cd00000a@amiindiahjwbgh> <20050922120852.543390ca@svb.ucs.co.za> <014101c5bf61$2bb37000$cd00000a@amiindiahjwbgh> X-Mailer: Sylpheed-Claws 1.9.6cvs1 (GTK+ 2.6.9; i486-pc-linux-gnu) User-Agent: sillypheed-claws (anti-aliased) X-Face: +lU/o'$=Zv9%Xjo]Kq[_{n&Kb`f{YEWH4&Y#M]'6BkD?VoWe#*@S\MWyD'I>s:0v4{#\[J]l*?]t2uaO(j$d*77Ca-UHo.tkl2)0$B3Jxww\o:xor]<:*Yfx9Vceh)9I/'2g\RKhGTxIIsR^ke^`LVeZ9ksb*:$kQeR@ X-Operating-System: sid X-X-X: _-^-_ Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.168 required=5 tests=[AWL=0.168] X-Spam-Level: X-Archive-Number: 200509/230 X-Sequence-Number: 18967 sandhya mentioned : =3D> No...What i need is... =3D> I want to know the equivalent sql queries for \l and \dt commands in o= rder =3D> to list the databases and tables. =3D> I want to do it through programming =46rom the psql man-page : -E --echo-hidden Echoes the actual queries generated by \d and other backslash commands. You can use this if you wish to include similar func- tionality into your own programs. This is equivalent to setting the variable ECHO_HIDDEN from within psql. If this is not _exactly_ what you need, then you're not exactly=20 explaining what you're trying to do :)