Re: how to get the source table & field name of a view field
В списке pgsql-sql по дате отправления:
| От | Christoph Haller |
|---|---|
| Тема | Re: how to get the source table & field name of a view field |
| Дата | |
| Msg-id | 3DCB7431.CCEF837@rodos.fzk.de обсуждение исходный текст |
| Ответ на | how to get the source table & field name of a view field ("Prime Ho" <ho@optimasoft.com.tw>) |
| Список | pgsql-sql |
> > if I want to write a function for getting the view.field's source > table.field > how could I achieve it? > This sounds like a real challange. Throughout the years I've had to learn it's always a pain to retrieve system catalog information - no matter which DBMS is in use. On the other hand, you have to face the fact that view.field's sources are not necessarily directly derived from a table.field. A view.field's source may be any expression including aggregates. So, the only way I can think of achieving that is SELECT definition from pg_views where viewname='<your view name>'; and then your function has to parse the result. Good luck. Regards, Christoph
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера