Обсуждение: Invalid Dependancies

Поиск
Список
Период
Сортировка

Invalid Dependancies

От
"Mark Wilson"
Дата:
Hi all,
 
Here's a problem that I hit recently.  Function f_A refers to table t_A.  Function f_B refers to function f_A.  View A also refers to table t_A. 
 
If I drop and re-create table t_A, I would expect f_A, f_B and A to be invalid.
 
Selecting from f_A, f_B, A does not say 'invalid object'.  Instead, it seems to corrupt the session/socket and kill my connection.
 
Is this correct behaviour?  Is there any way to detect what objects are invalid? (and if so, re-compile them)
 
Thanks in advance,
Mark

Re: Invalid Dependancies

От
Tom Lane
Дата:
"Mark Wilson" <mark@mediasculpt.com> writes:
> Selecting from f_A, f_B, A does not say 'invalid object'.  Instead, it seem=
> s to corrupt the session/socket and kill my connection.

Please provide a concrete example.

7.3 tightens up dependency issues somewhat, but more remains to do.
I'm not sure whether your problem is in the "solved" category or not.

            regards, tom lane

Re: Invalid Dependancies

От
"Mark Wilson"
Дата:
My Bad.

I built the example I listed and it returns the statement 'Relation t_A with
OID 2435345 no longer exists'.  My socket closure was unrelated to the table
drop/recreate (caused by calling an uninitialised C library).  I should have
checked that out before firing off to the lists.

With that said, I'm running 7.2.1 and would really like it if there is any
way to detect invalid database objects such as functions and views.  Being
able to re-compile them with a built in function/command would rock too,
although I think I can write a function to do that if I can just find out
what functions and views need to be rebuilt.

Cheers,
Mark

----- Original Message -----
From: "Tom Lane" <tgl@sss.pgh.pa.us>
To: "Mark Wilson" <mark@mediasculpt.com>
Cc: <pgsql-general@postgresql.org>
Sent: Wednesday, November 13, 2002 6:23 PM
Subject: Re: [GENERAL] Invalid Dependancies


> "Mark Wilson" <mark@mediasculpt.com> writes:
> > Selecting from f_A, f_B, A does not say 'invalid object'.  Instead, it
seem=
> > s to corrupt the session/socket and kill my connection.
>
> Please provide a concrete example.
>
> 7.3 tightens up dependency issues somewhat, but more remains to do.
> I'm not sure whether your problem is in the "solved" category or not.
>
> regards, tom lane
>
>