Re: Querying a parent table's child schemas

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Matthews, James" <jmatthews(at)Railpower(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Querying a parent table's child schemas
Date: 2007-08-30 16:01:14
Message-ID: 1982.1188489674@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

"Matthews, James" <jmatthews(at)Railpower(dot)com> writes:
> I was wondering if there was a way to SELECT from a parent table
> and display the schema associated with a child table's data.

It's not entirely clear to me which meaning of "schema" you have in
mind, but perhaps the tableoid system column would help you? That
lets you determine which child table the row really came from,
and then you can join to the system catalogs to get whatever data
you are actually after.

regards, tom lane

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Mija Lee 2007-08-30 17:15:22 Could not remove file messages
Previous Message Matthews, James 2007-08-30 13:30:56 Querying a parent table's child schemas