Re: Odd rule behavior?

From: Jon Lapham <lapham(at)extracta(dot)com(dot)br>
To: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Odd rule behavior?
Date: 2001-08-30 12:39:56
Message-ID: 3B8E341C.4020008@extracta.com.br
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)extracta(dot)com(dot)br web: http://www.extracta.com.br/
***-*--*----*-------*------------*--------------------*---------------

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Florian Weimer 2001-08-30 13:21:16 Re: Escaping strings for inclusion into SQL queries
Previous Message Francesco Casadei 2001-08-30 09:05:23 Re: [SQL] getting the oid for a new tuple in a BEFORE trigger