Re: Odd rule behavior? - Mailing list pgsql-hackers

From Jon Lapham
Subject Re: Odd rule behavior?
Date
Msg-id 3B8E341C.4020008@extracta.com.br
Whole thread Raw
In response to Re: Odd rule behavior?  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Responses Re: Odd rule behavior?
List pgsql-hackers
Stephan Szabo wrote:
> 
> When you drop and recreate the table, you'll need to drop and recreate the
> rules that reference it as well. There's been little to no concensus as to
> what the correct behavior should be in such cases: delete the rules when
> a referenced table is removed, refuse to remove the table due to the
> references, try to reconnect by name (and somehow handle the possibility
> that the reference is no longer valid, like say the lack of a logid column
> in your case)...
> 
> 

Okay, thanks, dropping and recreating the rule worked.

After thinking a bit about this, it would seem that the 'problem' is 
that I was *able* to drop a table that had rules referencing it.  Would 
it be possible to either not allow this, or to issue some type of 
warning message?  Otherwise, you go down the path of this (for me 
anyway) subtle problem.

Also, who should I send documentation patches to about this?  I couldn't 
find any mention of this issue in the "create rule" documentation (or am 
I looking in the wrong place?) or in "Chapter 17: The Postgres Rule 
System".  Hmmm, further perusal shows that Jan Weick is the author of 
the Chapter 17 documentation, I guess I can send text to Jan.

-- 

-**-*-*---*-*---*-*---*-----*-*-----*---*-*---*-----*-----*-*-----*--- Jon Lapham Extracta Moléculas Naturais, Rio de
Janeiro,Brasil email: lapham@extracta.com.br      web: http://www.extracta.com.br/
 
***-*--*----*-------*------------*--------------------*---------------



pgsql-hackers by date:

Previous
From: "Zeugswetter Andreas SB SD"
Date:
Subject: RE: Re: Toast,bytea, Text -blob all confusing
Next
From: Florian Weimer
Date:
Subject: Re: Escaping strings for inclusion into SQL queries