Foreign Key written as a trigger

Поиск
Список
Период
Сортировка
От George Woodring
Тема Foreign Key written as a trigger
Дата
Msg-id 54D4D0185B2D114A84630606A603DC924F49C8@iglassmail.istructure.com
обсуждение исходный текст
Ответы Re: Foreign Key written as a trigger  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
I have a database that has been upgrade numerous times (Started about
7.1 and is not 7.4.8).  The table has 2 foreign keys on it, but when I
look at the table I see that the FK applied before 7.4.X is written as a
trigger.  Everything seems to work, I was just wondering if there are
any performance reasons to change the trigger to a FK.


issp=> \d notpoll
      Table "public.notpoll"
   Column    |  Type   | Modifiers
-------------+---------+-----------
 notpollid   | integer | not null
 pollgrpid   | integer |
 notgroupsid | integer |
Indexes:
    "notpoll_pkey" primary key, btree (notpollid)
    "notpoll_pollgrpid_key" unique, btree (pollgrpid)
Foreign-key constraints:
    "pollgrp_exists" FOREIGN KEY (pollgrpid) REFERENCES
pollgrpinfo(pollgrpid) ON DELETE CASCADE
Triggers:
    "RI_ConstraintTrigger_2137396" AFTER INSERT OR UPDATE ON notpoll
FROM notgroups NOT DEFERRABLE INITIALLY IMMEDIATE FOR EACH ROW EXECUTE
PROCEDURE "RI_FKey_check_ins"('notgroups_exists', 'notpoll',
'notgroups', 'UNSPECIFIED', 'notgroupsid', 'notgroupsid')


Thanks,
Woody

----------------------------------------
iGLASS Networks
211-A S. Salem St
Apex NC 27502
(919) 387-3550 x813
www.iglass.net

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: DB/clog corruption
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Foreign Key written as a trigger