Re: Foreign key bugs + other problems

From: "Stephan Szabo" <sszabo(at)kick(dot)com>
To: "Jan Wieck" <JanWieck(at)Yahoo(dot)com>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Foreign key bugs + other problems
Date: 2000-07-11 22:00:10
Message-ID: 025d01bfeb83$61fee0c0$0c64010a@kick.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

> Rules aren't affected, because they refer to tables by OID
> always.
Ah, that's good. I hadn't tried that variation because I don't really
use rules that much other than select rules for views.

> > Or, you might be able to make a case that you CANNOT shadow a table
> > that is referenced by a constraint (due to the permanent table
constraints
> > cannot reference a temporary table restriction). Since the creation of
> > the temp table would break the restriction, it is illegal.
>
> Good point. What does the standard say about it? Can a table,
> referred to by foreign key constraints or referential
> actions, be shadowed by a temp table?
Well, that's the question. I don't see anything in the spec saying that it
can't precisely. It's a question of wording on the rules about the
constraint.

11.8 Syntax rule 4 Case a)
If the referencing table is a permanent base table, then the referenced
table
shall be a persistant base table.

So, if you shadowed the table by a temp table, would this no longer be true
(and therefore the create is illegal) or are you supposed to imply that you
still reference the persistant base table despite the fact it is shadowed?
I'd
guess the latter because it's a syntax rule (I had thought it was a general
rule until I went to look it up).

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2000-07-11 22:09:19 Re: Foreign key bugs + other problems
Previous Message Bruce Momjian 2000-07-11 21:47:58 Re: Foreign key bugs + other problems

Browse pgsql-hackers by date

  From Date Subject
Next Message Jan Wieck 2000-07-11 22:06:46 Re: update on TOAST status'
Previous Message Bruce Momjian 2000-07-11 21:47:58 Re: Foreign key bugs + other problems