"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