Re: function depend on view

Поиск
Список
Период
Сортировка
От Andreas Kretschmer
Тема Re: function depend on view
Дата
Msg-id 20120820124725.GA4178@tux
обсуждение исходный текст
Ответ на function depend on view  (salah jubeh <s_jubeh@yahoo.com>)
Ответы Re: function depend on view  (salah jubeh <s_jubeh@yahoo.com>)
Список pgsql-general
salah jubeh <s_jubeh@yahoo.com> wrote:

> Hello Guys,
>
> I am having a scenario close to the one below, I have defined a function which
> depends on a view. I am able to drop the view, but my server did not complain
> about the dependency.
>
> In the scenario  below, one can drop the views a2 and a1 respectively, and when
> executing a3(), certainly an exception will be raised. I think there should be
> an entry for this dependency in the pg_depend table with dependency type normal

I think, there is no real problem, it's (for me) the same as:

test=# select max(id) from table_that_does_not_exist;
ERROR:  relation "table_that_does_not_exist" does not exist
LINE 1: select max(id) from table_that_does_not_exist;


The database can't know and analyse the function-body.


Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect.                              (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly."   (unknown)
Kaufbach, Saxony, Germany, Europe.              N 51.05082°, E 13.56889°


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

Предыдущее
От: salah jubeh
Дата:
Сообщение: function depend on view
Следующее
От: Merlin Moncure
Дата:
Сообщение: Re: Views versus user-defined functions: formatting, comments, performance, etc.