Re: Querying a parent table's child schemas - Mailing list pgsql-novice

From Tom Lane
Subject Re: Querying a parent table's child schemas
Date
Msg-id 21705.1188503827@sss.pgh.pa.us
Whole thread Raw
In response to Re: Querying a parent table's child schemas  ("Matthews, James" <jmatthews@Railpower.com>)
List pgsql-novice
"Matthews, James" <jmatthews@Railpower.com> writes:
> I do the following:

> SELECT a.date, a.log_msg, p.relname
> FROM alarms a, pg_class p
> WHERE a.tableoid = p.oid;

> The relname column just lists alarms for every row.

If they're all named 'alarms', then yeah ... what you need is another
join to pg_namespace using relnamespace.

            regards, tom lane

pgsql-novice by date:

Previous
From: "Matthews, James"
Date:
Subject: Re: Querying a parent table's child schemas
Next
From: Mija Lee
Date:
Subject: Re: Could not remove file messages