X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (mx2.hub.org [200.46.204.254]) by postgresql.org (Postfix) with ESMTP id 4768E11F7A38 for ; Fri, 21 Apr 2006 15:01:17 -0300 (ADT) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Score: -2.589 X-Spam-Level: X-Spam-Status: No, score=-2.589 required=5 tests=[AWL=0.010, BAYES_00=-2.599] Received: from postgresql.org ([200.46.204.71]) by localhost (mx2.hub.org [200.46.204.254]) (amavisd-new, port 10024) with ESMTP id s2N65WucYmBu for ; Fri, 21 Apr 2006 15:01:10 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from wolff.to (wolff.to [66.93.197.194]) by postgresql.org (Postfix) with SMTP id 77AF311F6E12 for ; Fri, 21 Apr 2006 15:01:09 -0300 (ADT) Received: (qmail 20897 invoked by uid 500); 21 Apr 2006 18:03:56 -0000 Date: Fri, 21 Apr 2006 13:03:56 -0500 From: Bruno Wolff III To: Jeff Frost Cc: pgsql-sql@postgresql.org Subject: Re: find all tables with a specific column name? Message-ID: <20060421180356.GB13275@wolff.to> Mail-Followup-To: Bruno Wolff III , Jeff Frost , pgsql-sql@postgresql.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i X-Archive-Number: 200604/148 X-Sequence-Number: 24957 On Fri, Apr 21, 2006 at 09:29:33 -0700, Jeff Frost wrote: > Is there a reasonable way to extract a list of all tables which contain a > specific column name from the system views on 8.1? > > For instance, I might want to enumerate all tables with a column named > last_modified. Take a look at: http://developer.postgresql.org/docs/postgres/infoschema-columns.html and http://developer.postgresql.org/docs/postgres/infoschema-schema.html