From: Gordon Ross <G.Ross@ccw.gov.uk>
To: pgsql-sql@postgresql.org
Subject: Determining Inheritance
Date: Wed, 01 Oct 2003 10:51:59 +0100
Message-ID: <sf7aa3c9.006@groupwise.ccw.gov.uk> (raw)
Is there any way to determine which table a row belows to, if I do a
search on the top level table:
e.g. I have a table called "BASE". There are two tables which inherit
from "BASE" called "SUBTABLE1" and "SUBTABLE2"
If I do a SELECT * FROM BASE WHERE blah; how can I tell which table
(either SUBTABLE1 or SUBTABLE2) a row comes from ?
Do I need to add an extra column to BASE to specify which table a row
really belongs to ?
(If it helps or hinders, I am ultimately going to be doing this via
JDBC)
Thanks,
GTG
Gordon Ross,
Network Manager/Rheolwr Rhydwaith
Countryside Council for Wales/Cyngor Cefn Gwlad Cymru
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: G.Ross@ccw.gov.uk
Subject: Re: Determining Inheritance
In-Reply-To: <sf7aa3c9.006@groupwise.ccw.gov.uk>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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