Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 8915B1337BF9 for ; Tue, 5 Apr 2011 11:45:07 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 01296-10 for ; Tue, 5 Apr 2011 14:44:59 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-vw0-f46.google.com (mail-vw0-f46.google.com [209.85.212.46]) by mail.postgresql.org (Postfix) with ESMTP id F0A251337BF8 for ; Tue, 5 Apr 2011 11:44:56 -0300 (ADT) Received: by vws1 with SMTP id 1so305353vws.19 for ; Tue, 05 Apr 2011 07:44:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:subject:date:user-agent:cc:references :in-reply-to:mime-version:content-type:content-transfer-encoding :message-id; bh=pa64r8lHHNBqoQAv6J6NN7tmSLskUcyEDRiARctzV9Y=; b=heFShlK3C0FIHjeaLLab/wRxX9HhKiOtwFTZOE5ZZXYoUzeGjBYbYsXCu3G7H6VTsE aOkvo7JAjK0g58WmRQPbEu6Pa2RYzDA5rgXQpNeEQ4X44BsyvyTsDBvha9L/griy22tC 2/MzNKZ8H6O1ipY/YpJM0pPaIvX49tEF6DZao= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:cc:references:in-reply-to :mime-version:content-type:content-transfer-encoding:message-id; b=BByCBs2zt0epGIhJeP7LdggKFJALXZX9SvKqXTHPGoJid1VWo9jmzdX2TK79yjbxd9 ROgfwyeCuyATspU2LmXc7+6+Th69P5lHkYJv6KB//D+eE2EK5jZf8OUA3mjm0FZflaUX 7lFh6ff6DZhkZWCz/450ABPtXKOdNEKEX/6MU= Received: by 10.52.173.108 with SMTP id bj12mr44390vdc.177.1302014697206; Tue, 05 Apr 2011 07:44:57 -0700 (PDT) Received: from tucker.localnet (c-24-17-164-54.hsd1.wa.comcast.net [24.17.164.54]) by mx.google.com with ESMTPS id s20sm516453vcn.22.2011.04.05.07.44.54 (version=SSLv3 cipher=OTHER); Tue, 05 Apr 2011 07:44:56 -0700 (PDT) From: Adrian Klaver To: pgsql-sql@postgresql.org Subject: Re: is there a refactor Date: Tue, 5 Apr 2011 07:44:51 -0700 User-Agent: KMail/1.13.5 (Linux/2.6.32-30-generic; KDE/4.4.5; i686; ; ) Cc: John Fabiani References: <201104050727.24713.johnf@jfcomputer.com> In-Reply-To: <201104050727.24713.johnf@jfcomputer.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201104050744.52471.adrian.klaver@gmail.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.889 tagged_above=-5 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, T_TO_NO_BRKTS_FREEMAIL=0.01 X-Spam-Level: X-Archive-Number: 201104/3 X-Sequence-Number: 35250 On Tuesday, April 05, 2011 7:27:24 am John Fabiani wrote: > Hi, > I would like to have a simple way to retrieve information for a field name. > By that I mean have some SQL select that will return all the tables a field > name exist within a database. I did not find anything with google but of > course google depends on the search string. > > Thanks in advance, > Johnf test(5432)aklaver=>SELECT table_name from information_schema.columns where column_name = 'id'; table_name ---------------- user_test table2 table1 hours jedit_test topics t2 stone serial_test messages binary_test user_test timestamp_test role_t py_test money_test lock_test local_1 lang_test interval_test foob fooa fldlength fk_1 default_test csv_null check_two check_test array_test (29 rows) -- Adrian Klaver adrian.klaver@gmail.com