Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id ADF919FB3B3 for ; Fri, 19 Jan 2007 11:46:07 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 25985-07 for ; Fri, 19 Jan 2007 11:45:59 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from wolff.to (wolff.to [66.93.197.194]) by postgresql.org (Postfix) with SMTP id B36C69FB38A for ; Fri, 19 Jan 2007 11:45:59 -0400 (AST) Received: (qmail 31651 invoked by uid 500); 19 Jan 2007 15:45:49 -0000 Date: Fri, 19 Jan 2007 09:45:49 -0600 From: Bruno Wolff III To: paallen@attglobal.net Cc: pgsql-sql@postgresql.org Subject: Re: Query to return schema/table/columname/columntype Message-ID: <20070119154549.GB13687@wolff.to> Mail-Followup-To: Bruno Wolff III , paallen@attglobal.net, pgsql-sql@postgresql.org References: <20070119124622.0DE929FB2A3@postgresql.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070119124622.0DE929FB2A3@postgresql.org> User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200701/81 X-Sequence-Number: 27233 On Fri, Jan 19, 2007 at 12:41:19 +0000, paallen@attglobal.net wrote: > For background I am selecting table & schema by > the query: > SELECT schemaname || '.' || tablename AS tablename > FROM pg_tables ORDER BY tablename; Are you guaranteed that all of the names are lower case? If not you may want to include quoting in your query. I didn't have a good answer for the base question you asked; this was more under the suggestions category.