Determining Inheritance

Поиск
Список
Период
Сортировка
От Gordon Ross
Тема Determining Inheritance
Дата
Msg-id sf7aa3c9.006@groupwise.ccw.gov.uk
обсуждение исходный текст
Ответы Re: Determining Inheritance  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: "Mark Roberts"
Дата:
Сообщение: Unsubscribe
Следующее
От: "CN"
Дата:
Сообщение: Creating Index