Re: additional foreign key test coverage

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: additional foreign key test coverage
Date: 2018-12-04 13:23:20
Message-ID: 20181204132320.kzismcb7bajz4lvc@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 2018-Dec-04, Peter Eisentraut wrote:

> During the development of my recent patch "unused/redundant foreign key
> code" [0], I had developed a few additional test cases to increase the
> coverage in ri_triggers.c. They are in the attached patches with
> explanations. With these, coverage should be pretty complete, except
> hard-to-trigger error cases. Interested reviewers can also follow along
> on

Hmm. One of the things I did for FKs on partitioned tables was remove
all the cases involving only unpartitioned tables, then run just the
foreign_key test and see what the coverage looked like -- in the first
versions, there were large swaths of uncovered code. That guided me to
add a few more tests to increase coverage in later versions. This is
all to say that I think it would be useful to include the case of
partitioned tables in the tests you add, where relevant.

Álvaro Herrera
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2018-12-04 14:38:34 psql display of foreign keys
Previous Message Peter Eisentraut 2018-12-04 13:15:07 additional foreign key test coverage