pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedtable column names - search
3+ messages / 2 participants
[nested] [flat]
* table column names - search
@ 2008-01-14 16:38 Marcin Krawczyk <jankes.mk@gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Marcin Krawczyk @ 2008-01-14 16:38 UTC (permalink / raw)
To: pgsql-sql
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.
Regards,
mk
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: table column names - search
@ 2008-01-14 17:24 Peter Eisentraut <peter_e@gmx.net>
parent: Marcin Krawczyk <jankes.mk@gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Peter Eisentraut @ 2008-01-14 17:24 UTC (permalink / raw)
To: pgsql-sql; +Cc: Marcin Krawczyk <jankes.mk@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/
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: table column names - search
@ 2008-01-14 18:30 Marcin Krawczyk <jankes.mk@gmail.com>
parent: Peter Eisentraut <peter_e@gmx.net>
0 siblings, 0 replies; 3+ messages in thread
From: Marcin Krawczyk @ 2008-01-14 18:30 UTC (permalink / raw)
To: Peter Eisentraut <peter_e@gmx.net>; +Cc: pgsql-sql
Thanks a lot.
2008/1/14, Peter Eisentraut <peter_e@gmx.net>:
>
> 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/
>
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2008-01-14 18:30 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2008-01-14 16:38 table column names - search Marcin Krawczyk <jankes.mk@gmail.com>
2008-01-14 17:24 ` Peter Eisentraut <peter_e@gmx.net>
2008-01-14 18:30 ` Marcin Krawczyk <jankes.mk@gmail.com>
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