Re: function depend on view - Mailing list pgsql-general

From Andreas Kretschmer
Subject Re: function depend on view
Date
Msg-id 20120820124725.GA4178@tux
Whole thread Raw
In response to function depend on view  (salah jubeh <s_jubeh@yahoo.com>)
Responses Re: function depend on view  (salah jubeh <s_jubeh@yahoo.com>)
List 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 by date:

Previous
From: salah jubeh
Date:
Subject: function depend on view
Next
From: Merlin Moncure
Date:
Subject: Re: Views versus user-defined functions: formatting, comments, performance, etc.