Received: from kop.maaco.com ([204.7.160.19]) by hub.org (8.9.3/8.9.3) with ESMTP id KAA02095 for ; Tue, 25 May 1999 10:14:57 -0400 (EDT) (envelope-from aturner@maaco.com) Received: from maaco.com (W10340 [204.7.161.54]) by kop.maaco.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2448.0) id LTZRFBD7; Tue, 25 May 1999 10:10:24 -0400 Message-ID: <374AA298.D478E5F9@maaco.com> Date: Tue, 25 May 1999 09:16:08 -0400 From: Alex Turner X-Mailer: Mozilla 4.51 [en] (WinNT; I) X-Accept-Language: en MIME-Version: 1.0 To: Herouth Maoz CC: Postgres mailing list Subject: Re: [INTERFACES] Retreiving Table info References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Brilliant! worked first time. pg_class is the one! I know that you can get the types from a database from the metadata, but I'm wondering if there is also a way to issue to an SQL query to postgres that will yield the same result. Alex T Herouth Maoz wrote: > At 14:52 +0300 on 25/05/1999, Alex Turner wrote: > > > > > however.. is it possible to open a connection to the database and > > determine what tables are in the database already? > > Of course. It's a query, just like any other query, but you select the data > from the system catalogs rather than your own tables. Take a look in the > documentation - the manpage for "catalogs". > > The table you should query is probably pg_class. > > Herouth > > -- > Herouth Maoz, Internet developer. > Open University of Israel - Telem project > http://telem.openu.ac.il/~herutma