Received: from druid.net (root@druid.net [216.126.72.98]) by hub.org (8.9.3/8.9.3) with ESMTP id HAA02978 for ; Tue, 17 Aug 1999 07:55:16 -0400 (EDT) (envelope-from darcy@druid.net) Received: from localhost (1762 bytes) by druid.net via sendmail with P:stdio/R:bind_hosts/T:inet_zone_bind_smtp (sender: ) (ident using unix) id for ; Tue, 17 Aug 1999 07:54:46 -0400 (EDT) (Smail-3.2.0.104 1998-Nov-20 #4 built 1999-Apr-13) Message-Id: Subject: Re: [INTERFACES] A few more JDBC meta-data questions... In-Reply-To: <1BF7C7482189D211B03F00805F8527F70ED0F1@S-NATH-EXCH2> from "Ansley, Michael" at "Aug 17, 1999 01:39:54 pm" To: Michael.Ansley@intec.co.za (Ansley Michael) Date: Tue, 17 Aug 1999 07:54:46 -0400 (EDT) From: "D'Arcy" "J.M." Cain Cc: pgsql-interfaces@postgreSQL.org Reply-To: pgsql-interfaces@postgreSQL.org X-Mailer: ELM [version 2.4ME+ PL50 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Thus spake Ansley, Michael > Most databases require that you use SQL to query for metadata. If you are Certainly true of PostgreSQL. > using something like DAO on a Win32 platform, then you get a nice object > hierarchy which you can use to discover the data model, but otherwise you > are reduced to SQL. And DAO can't give you a list of databases!! This is While SQL has its warts, it's not bad as a base. Those queries I included come from my PyGreSQL stuff (http://www.druid.net/pygresql/) so that I simply do db.get_databases(), db.get_tables() or db.get_attnames(table) to get the information. > something that you have to have a connection for, bit of a catch22. > However, this can normally still be written in a reasonably modular fashion. As someone else pointed out, you always have template1 to query against to get the full list of databases from. -- D'Arcy J.M. Cain | Democracy is three wolves http://www.druid.net/darcy/ | and a sheep voting on +1 416 424 2871 (DoD#0082) (eNTP) | what's for dinner.