Search Postgresql Archives

Foreign Key written as a trigger

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux