Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZePrT-000123-29 for pgsql-bugs@arkaria.postgresql.org; Tue, 22 Sep 2015 15:52:07 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZePrS-0003B5-Kd for pgsql-bugs@arkaria.postgresql.org; Tue, 22 Sep 2015 15:52:06 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZeNsp-0002ab-0x for pgsql-bugs@postgresql.org; Tue, 22 Sep 2015 13:45:23 +0000 Received: from wrigleys.postgresql.org ([204.145.124.246]) by magus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1ZeNsU-0003w0-H4 for pgsql-bugs@postgresql.org; Tue, 22 Sep 2015 13:45:22 +0000 MIME-Version: 1.0 Subject: =?utf-8?b?QlVHICMxMzYzMjogdmlvbGF0aW9uIGRlIGwnaW50w6lncml0w6kgcsOp?= =?utf-8?q?f=C3=A9rentielle?= To: pgsql-bugs@postgresql.org From: allhassane@yahoo.fr Date: Tue, 22 Sep 2015 13:44:04 +0000 Message-ID: <20150922134404.5050.75087@wrigleys.postgresql.org> X-Pg-Spam-Score: -0.2 (/) Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org The following bug has been logged on the website: Bug reference: 13632 Logged by: Alassane Diakité Email address: allhassane@yahoo.fr PostgreSQL version: 9.4.4 Operating system: windows Description: Salut La situation... Les tables tm et tf (tf liée à tm par une intégrité référentielle) [code]create table tm(idm serial not null primary key, vm varchar); create table tf(idf serial not null primary key, idm int not null references tm(idm) on delete cascade, vf varchar);[/code] Un fonction trigger qui annule la suppression dans tf [code] --le trigger create function tgtf() returns trigger as $$ begin return null; end $$ language plpgsql --liaison à tf create trigger tgf before delete on tf FOR EACH ROW EXECUTE PROCEDURE tgtf(); [/code] insertion de données dans tm et tf [code]insert into tm(vm) values('a'),('b'),('c'); insert into tf(idm, vf) values(1, 'a1'),(1, 'a2'), (2, 'b1'), (2, 'b2'),(3, 'c1'),(3, 'c2');[/code] suppression d'une ligne de tm [code]delete from tm where idm=1;[/code] la jointure gauche [code]select tf.idm, tf.vf, tm.idm from tf left join tm on tf.idm=tm.idm;[/code] idm vf idm 1 a1 null 1 a2 null 2 b1 2 2 b2 2 3 c1 3 3 c2 3 Qu'en dites-vous? J'avais une fois remarqué qu'une des mes bd présentait ce problème (violation d'intégrité référentielle) sans que je ne sache comment c'est arrivé. Maintenant que j'ai reproduit la situation, je veux comprendre le problème. @+ -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs