| От | Andre Fortin |
|---|---|
| Тема | How to identify the class of a record |
| Дата | |
| Msg-id | 3A4E503C.4ADA926A@axionet.com обсуждение исходный текст |
| Ответы |
Re: How to identify the class of a record
|
| Список | pgsql-general |
Hi!,
Here is a scenario. The database contains 3 tables: the parent table is
Equipment with tables Computers and Monitors inheriting from it.
CREATE TABLE Equipment (...);
CREATE TABLE Computers (...) INHERITS (Equipment);
CREATE TABLE Monitors (...) INHERITS (Equipment);
When doing a SELECT on the parent with the asterisk suffix syntax, we
get rows from Computer and Monitor.
SELECT * from Equipment*;
Is there a way to know from which table each row in the returned record
set belongs to, as you can do with OO languages. If this is possible,
could you point where more information could be located on this type of
design when working with Postgres.
Thanks,
-- Andre
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера