Re: [HACKERS] FKey not enforced resulting in broken Dump/Reload

2013-07-19 Thread Robert Haas
On Fri, Jul 19, 2013 at 12:58 PM, Rod Taylor rod.tay...@gmail.com wrote: A poorly coded trigger on the referencing table has the ability to break foreign keys, and as a result create a database which cannot be dumped and reloaded. The BEFORE DELETE trigger accidentally does RETURN NEW, which

[HACKERS] FKey not enforced resulting in broken Dump/Reload

2013-07-19 Thread Rod Taylor
A poorly coded trigger on the referencing table has the ability to break foreign keys, and as a result create a database which cannot be dumped and reloaded. The BEFORE DELETE trigger accidentally does RETURN NEW, which suppresses the DELETE action by the foreign key trigger. This allows the

Re: [HACKERS] FKey not enforced resulting in broken Dump/Reload

2013-07-19 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Fri, Jul 19, 2013 at 12:58 PM, Rod Taylor rod.tay...@gmail.com wrote: A poorly coded trigger on the referencing table has the ability to break foreign keys, and as a result create a database which cannot be dumped and reloaded. This is a known

Re: [HACKERS] FKey not enforced resulting in broken Dump/Reload

2013-07-19 Thread Robert Haas
On Fri, Jul 19, 2013 at 1:45 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Fri, Jul 19, 2013 at 12:58 PM, Rod Taylor rod.tay...@gmail.com wrote: A poorly coded trigger on the referencing table has the ability to break foreign keys, and as a result create a

Re: [HACKERS] FKey not enforced resulting in broken Dump/Reload

2013-07-19 Thread Robert Haas
On Fri, Jul 19, 2013 at 2:15 PM, Robert Haas robertmh...@gmail.com wrote: On Fri, Jul 19, 2013 at 1:45 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Fri, Jul 19, 2013 at 12:58 PM, Rod Taylor rod.tay...@gmail.com wrote: A poorly coded trigger on the