Re: RI triggers and schemas

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: RI triggers and schemas
Дата
Msg-id 4199.1017675551@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: RI triggers and schemas  (Jan Wieck <janwieck@yahoo.com>)
Ответы Re: RI triggers and schemas  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Список pgsql-hackers
Jan Wieck <janwieck@yahoo.com> writes:
> Christopher Kings-Lynne wrote:
>> Why can't we just hack up the CREATE CONSTRAINT TRIGGER code to look up
>> the OIDs, etc. for the arguments and convert them internally to an ALTER
>> TABLE/ADD CONSTRAINT or whatever...

>     And  what  language  hack  do  you  suggest  to  suppress the
>     complete referential check of the foreign key table at  ALTER
>     TABLE  ...  time?

Actually, I was interpreting his idea to mean that we add intelligence
to CREATE TRIGGER to adjust the specified trigger arguments if it sees
the referenced trigger procedure is one of the RI triggers.  It'd be
fairly self-contained, really, since the CREATE TRIGGER code could use
its "ON table" and "FROM table" arguments to derive the correct OIDs
to insert.  This could be done always (whether the incoming arguments
look like OIDs or not), which'd also give us a short-term answer for
dumping/reloading 7.3-style RI triggers.  I'd still like to change
pg_dump to output some kind of ALTER command in place of CREATE TRIGGER,
but we'd have some breathing room to debate about how.

I'm now inclined to leave the attribute arguments alone (stick to names
not numbers) just to avoid possible conversion problems there.
        regards, tom lane


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

Предыдущее
От: Bradley McLean
Дата:
Сообщение: Proposed patch for ODBC driver w/ C-a-n-c-e-l
Следующее
От: Jessica Perry Hekman
Дата:
Сообщение: Re: timeout implementation issues