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 wrote: > On Fri, Jul 19, 2013 at 1:45 PM, Tom Lane wrote: >> Robert Haas writes: >>> On Fri, Jul 19, 2013 at 12:58 PM, Rod Taylor wrote: A poorly coded trigger on the referencing table has the ability to break foreign keys, and as a result

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 wrote: > Robert Haas writes: >> On Fri, Jul 19, 2013 at 12:58 PM, Rod Taylor 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.

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

2013-07-19 Thread Tom Lane
Robert Haas writes: > On Fri, Jul 19, 2013 at 12:58 PM, Rod Taylor 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 limitation of our foreign key machine

[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 recor

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 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 suppresses the >