Re: Test-cases for deferred constraints in plpgsql_transaction.sql

From: Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)com>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Test-cases for deferred constraints in plpgsql_transaction.sql
Date: 2018-07-02 10:16:01
Message-ID: CAE9k0Pm_kv3jtzPd82+YEmHrXkA8+=PHdui-e6BAMr8KUt-q8Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jul 2, 2018 at 3:30 PM, Peter Eisentraut
<peter(dot)eisentraut(at)2ndquadrant(dot)com> wrote:
> On 02.07.18 11:46, Ashutosh Sharma wrote:
>> Currently, I could see only one test-case for deferred constraints in
>> plpgsql_transaction.sql file which tests if the constraint checking is
>> happening during commit time or not with the help of COMMIT statement.
>> Shouldn't we add some more test-cases to test ROLLBACK and SET
>> CONSTRAINTS statements with deferrable constraints inside DO blocks.
>
> The purpose of that test is to check what happens when the COMMIT
> command fails. Using deferrable constraints is just a way to trigger an
> error coming from the COMMIT command.
>
> I won't say we don't need more tests, but I don't see a particular
> testing gap in this area.
>

I am not saying that the existing test-case is not enough to test
deferred constraints but, it would have been good to add test-cases
having ROLLBACK statements with deferred constraints as well.

--
With Regards,
Ashutosh Sharma
EnterpriseDB:http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Khandekar 2018-07-02 11:36:39 Re: Concurrency bug in UPDATE of partition-key
Previous Message Thomas Munro 2018-07-02 10:14:42 Re: How to find the base version cf-bot is using?