Re: [HACKERS] Inheritance of foregn key constraints - dropping isinternal triggers by a

2014-04-02 Thread Andrzej Mazurkiewicz
On Tuesday 01 of April 2014 11:06:00 you wrote: > On Tue, Apr 1, 2014 at 9:13 AM, Andrzej Mazurkiewicz < > > andr...@mazurkiewicz.org> wrote: > > It seems that if the trigger is internal (tgisinternal = true) it is not > > visible to the DROP TRIGGER command. So it cannot be deleted using DROP > >

Re: [HACKERS] Inheritance of foregn key constraints.

2014-04-01 Thread Robert Haas
On Tue, Apr 1, 2014 at 8:13 AM, Andrzej Mazurkiewicz wrote: > That change is necessary to reduce scope of modifications necessary for an > implementation of the inheritance of foregn key constraints, particularly for > removing of objects. Nobody here is going to accept that goal as a valid reaso

Re: [HACKERS] Inheritance of foregn key constraints.

2014-04-01 Thread Tom Lane
Andrzej Mazurkiewicz writes: > After reading please comment if there are more objections for changing the > depedency type for trigger to constraint dependency from the > DEPENDENCY_INTERNAL to DEPENDENCY_AUTO. I'm not sure which part of "no" you didn't understand, but we're not doing that. >

Re: [HACKERS] Inheritance of foregn key constraints.

2014-04-01 Thread Fabrízio de Royes Mello
On Tue, Apr 1, 2014 at 9:13 AM, Andrzej Mazurkiewicz < andr...@mazurkiewicz.org> wrote: > > It seems that if the trigger is internal (tgisinternal = true) it is not > visible to the DROP TRIGGER command. So it cannot be deleted using DROP > TRIGGER command, although the dependency type is DEPENDENC

Re: [HACKERS] Inheritance of foregn key constraints.

2014-04-01 Thread Andrzej Mazurkiewicz
Good Afternoon. Enclosed please find continuation of the discussion of an accidental or malicious breaking a server consistency. After reading please comment if there are more objections for changing the depedency type for trigger to constraint dependency from the DEPENDENCY_INTERNAL to DEPEND

Re: [HACKERS] Inheritance of foregn key constraints.

2014-03-22 Thread Tom Lane
Andrzej Mazurkiewicz writes: >> So in other words, somebody could (accidentally or maliciously) break the >> constraint by dropping one of its implementation triggers. I doubt that's >> acceptable. > The present postgres behavior ALLOWS accidental or malicious break the > constraint by dropping

Re: [HACKERS] Inheritance of foregn key constraints.

2014-03-22 Thread Andrzej Mazurkiewicz
Good Morning. 1. At the beginning some explanations. I am a lazy person that tries not to reinvent a wheel. So I try to use postgres way of automatic processing, i. e. automatic removing dependent objects (which I consider an elegant solution and I really like it). A a result, I have used the p

Re: [HACKERS] Inheritance of foregn key constraints.

2014-03-21 Thread Tom Lane
Andrzej Mazurkiewicz writes: > My patch need one change that might be of significance. > A type of the depencencies (pg_depend) among the FK constraint > (pg_constraint) > and the corresponding "RI_ConstraintTrigger" triggers has to be changed from > DEPENDENCY_INTERNAL to DEPENDENCY_AUTO. So

[HACKERS] Inheritance of foregn key constraints.

2014-03-21 Thread Andrzej Mazurkiewicz
http://wiki.postgresql.org/wiki/Todo Section "Inheritance" "Allow inherited tables to inherit indexes, UNIQUE constraints, and primary/FOREIGN KEYS" Good Morning. I started to program a patch for inheritance of the foreign key constraints. I. e. after applying the patch FKs are maintained bet