Lists: | pgsql-general |
---|
From: | Garry Saddington <garry(at)schoolteachers(dot)co(dot)uk> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | filter tables from database |
Date: | 2010-08-11 14:13:52 |
Message-ID: | 4C62B020.2050909@schoolteachers.co.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general |
I can retrieve the table names in my database, but I would like to
filter them based on the name of a field. Is this possible?
Thanks
Garry
From: | Thom Brown <thom(at)linux(dot)com> |
---|---|
To: | Garry Saddington <garry(at)schoolteachers(dot)co(dot)uk> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: filter tables from database |
Date: | 2010-08-11 14:46:04 |
Message-ID: | AANLkTikb1+Hb+E9G9Bhg5stOGBJiLPn2-GxigdcxONT-@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general |
On 11 August 2010 15:13, Garry Saddington <garry(at)schoolteachers(dot)co(dot)uk> wrote:
> I can retrieve the table names in my database, but I would like to filter
> them based on the name of a field. Is this possible?
> Thanks
> Garry
>
> --
Hi Garry,
You can do this:
SELECT table_name
FROM information_schema.columns
WHERE column_name = 'put_column_name_here'
Regards
Thom Brown
Registered Linux user: #516935