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

RI triggers and schemas

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>,Jan Wieck <JanWieck(at)Yahoo(dot)com>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: RI triggers and schemas
Date: 2002-03-26 20:32:08
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
As of CVS tip, referential integrity triggers are kinda broken: they
will only work for tablenames that are in the current search path.
I think that instead of storing just table names in the trigger
parameters, we should store either table OIDs or schema name + table
name.  Do you have any preferences about this?

An advantage of using OIDs is that we could forget the pushups that
ALTER TABLE RENAME presently goes through to update RI triggers.

On the other hand, as long as the RI implementation depends on
generating textual queries, it'd be faster to have the names available
than to have to look them up from the OID.  But I seem to recall Stephan
threatening to rewrite that code at a lower level pretty soon, so the
speed issue might go away.  In any case it's probably a minor issue
compared to generating the query plan.

So I'm leaning towards OIDs, but wanted to see if anyone had a beef
with that.

			regards, tom lane


pgsql-hackers by date

Next:From: Tom LaneDate: 2002-03-26 20:53:34
Subject: Indexes, TOAST tables, and namespaces
Previous:From: Jan WieckDate: 2002-03-26 20:17:29
Subject: Re: RI triggers and schemas

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