marking record origin in views

Поиск
Список
Период
Сортировка
От Claudio Lapidus
Тема marking record origin in views
Дата
Msg-id BAY7-DAV48ZzWD661HU0000484d@hotmail.com
обсуждение исходный текст
Ответы Re: marking record origin in views  ("Peter Alberer" <h9351252@obelix.wu-wien.ac.at>)
Re: marking record origin in views  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Hello list

I have two tables with identical structure, one holds 'correct' data (from
an application standpoint) and the other has data 'in error'. Anyway, I need
sometimes to query both tables at the same time, so I constructed an
elementary view

create view v1 as select * from t1 union select * from t2;

But I would like to have an extra field (in the view) with the table name of
the particular record source. How can this be done?

thanks
cl.


В списке pgsql-general по дате отправления:

Предыдущее
От: Jeremiah Jahn
Дата:
Сообщение: cross table indexes?
Следующее
От: "Peter Alberer"
Дата:
Сообщение: Re: marking record origin in views