Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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:

In response to


pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group