From: Peter Eisentraut <peter_e@gmx.net>
To: pgsql-sql@postgresql.org
Cc: Marcin Krawczyk <jankes.mk@gmail.com>
Subject: Re: table column names - search
Date: Mon, 14 Jan 2008 18:24:11 +0100
Message-ID: <200801141824.12322.peter_e@gmx.net> (raw)
In-Reply-To: <95f6bf9b0801140838v2c14f3aav310a7011eabdb1f5@mail.gmail.com>
References: <95f6bf9b0801140838v2c14f3aav310a7011eabdb1f5@mail.gmail.com>
Am Montag, 14. Januar 2008 schrieb Marcin Krawczyk:
> Hi all. I would like to know if there's a way to obtain a list of tables
> containing specified column name? Using standard LIKE '%string' syntax
> would be great.
SELECT table_schema, table_name FROM information_schema.columns WHERE
column_name LIKE '%name%';
Add DISTINCT and other columns to taste.
--
Peter Eisentraut
http://developer.postgresql.org/~petere/
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: peter_e@gmx.net, jankes.mk@gmail.com
Subject: Re: table column names - search
In-Reply-To: <200801141824.12322.peter_e@gmx.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox