Re: RI triggers and schemas

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: RI triggers and schemas
Дата
Msg-id 20020326124622.V14233-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на RI triggers and schemas  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: RI triggers and schemas  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Tue, 26 Mar 2002, Tom Lane wrote:

> 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.

I'd say oids are better (and probably attnos for the columns). That's
generally what I've been assuming in my attempts on rewriting the
code. I've been working on getting something together using the
heap_*/index_* scanning functions.  I feel like I'm reimplementing alot of
wheels though, so I need to see what I can use from other places.



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jan Wieck
Дата:
Сообщение: Re: RI triggers and schemas
Следующее
От: Tom Lane
Дата:
Сообщение: Re: RI triggers and schemas