| From: | Jeff Frost <jeff(at)frostconsultingllc(dot)com> |
|---|---|
| To: | Bruno Wolff III <bruno(at)wolff(dot)to> |
| Cc: | pgsql-sql(at)postgresql(dot)org |
| Subject: | Re: find all tables with a specific column name? |
| Date: | 2006-04-21 18:30:25 |
| Message-ID: | Pine.LNX.4.64.0604211129340.1527@glacier.frostconsultingllc.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
On Fri, 21 Apr 2006, Bruno Wolff III wrote:
> On Fri, Apr 21, 2006 at 09:29:33 -0700,
> Jeff Frost <jeff(at)frostconsultingllc(dot)com> 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
Thanks Bruno! It appears I can simply do this:
select table_name from information_schema.columns where column_name =
'last_modified';
--
Jeff Frost, Owner <jeff(at)frostconsultingllc(dot)com>
Frost Consulting, LLC http://www.frostconsultingllc.com/
Phone: 650-780-7908 FAX: 650-649-1954
| From | Date | Subject | |
|---|---|---|---|
| Next Message | George Young | 2006-04-21 18:31:41 | Re: find all tables with a specific column name? |
| Previous Message | Bruno Wolff III | 2006-04-21 18:03:56 | Re: find all tables with a specific column name? |