Re: How can I find the schema that a table belongs to?

From: Jerry LeVan <jerry(dot)levan(at)mac(dot)com>
To: DM <dm(dot)aeqa(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How can I find the schema that a table belongs to?
Date: 2011-01-19 20:58:10
Message-ID: F28AA0CB-5201-44D4-99D8-980E1EB82B58@mac.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Jan 19, 2011, at 3:12 PM, DM wrote:

> one of the way to find out schema name is like below
>
> select * from pg_tables where tablename like '%xyz%';
> schemaname | tablename | tableowner | tablespace | hasindexes | hasrules | hastriggers
> ------------+-----------+------------+------------+------------+----------+-------------
> (0 rows)
>
> ~Deepak
>

That does not work if the user entered a 'view' in the sql box.

Also a table/view could be in several schemas...

Jerry

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message hubert depesz lubaczewski 2011-01-19 21:17:33 Re: Group by with insensitive order
Previous Message John R Pierce 2011-01-19 20:56:02 Re: PostgreSQL 9.0.1 PITR can not copy WAL file