Determining Inheritance - Mailing list pgsql-sql

From Gordon Ross
Subject Determining Inheritance
Date
Msg-id sf7aa3c9.006@groupwise.ccw.gov.uk
Whole thread Raw
Responses Re: Determining Inheritance
List pgsql-sql
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


pgsql-sql by date:

Previous
From: "Mark Roberts"
Date:
Subject: Unsubscribe
Next
From: "CN"
Date:
Subject: Creating Index