Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 059F22E2EDC for ; Mon, 14 Jan 2008 13:24:16 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 30597-10 for ; Mon, 14 Jan 2008 13:24:14 -0400 (AST) Received: from gauss.credativ.com (gauss.credativ.com [212.112.227.254]) by postgresql.org (Postfix) with ESMTP id 7AE0D2E2EC7 for ; Mon, 14 Jan 2008 13:24:15 -0400 (AST) Received: from hawking.credativ.lan (exit.credativ.com [87.139.82.80]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by gauss.credativ.com (Postfix) with ESMTP id 7FDD877578; Mon, 14 Jan 2008 18:24:13 +0100 (CET) From: Peter Eisentraut To: pgsql-sql@postgresql.org Subject: Re: table column names - search Date: Mon, 14 Jan 2008 18:24:11 +0100 User-Agent: KMail/1.9.7 Cc: "Marcin Krawczyk" References: <95f6bf9b0801140838v2c14f3aav310a7011eabdb1f5@mail.gmail.com> In-Reply-To: <95f6bf9b0801140838v2c14f3aav310a7011eabdb1f5@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200801141824.12322.peter_e@gmx.net> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200801/111 X-Sequence-Number: 29964 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/