Re: RI triggers and schemas - Mailing list pgsql-hackers

From Tom Lane
Subject Re: RI triggers and schemas
Date
Msg-id 5310.1017681554@sss.pgh.pa.us
Whole thread Raw
In response to Re: RI triggers and schemas  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Responses Re: RI triggers and schemas  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
List pgsql-hackers
Stephan Szabo <sszabo@megazone23.bigpanda.com> writes:
> Well, there is another place where the current name behavior
> causes problems so we'd need to be sticking in the fully qualified
> name, otherwise creating a table in your search path earlier than
> the intended table would break the constraint.  This currently already
> happens with temp tables.

But the point is that the table name would be resolved to OID once at
CREATE TRIGGER time (or when the original FK constraint is created).
After that, it's up to the trigger to construct queries using the
fully-qualified table name.  This should eliminate the temp table
gotcha as well as change-of-search-path issues.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: RI triggers and schemas
Next
From: Bruce Momjian
Date:
Subject: Re: timeout implementation issues