Re: [fixed] Trigger test
Dmitrii Bondar <d.bondar@postgrespro.ru>
From: Dmitrii Bondar <d.bondar@postgrespro.ru>
To: pgsql-hackers@lists.postgresql.org
Cc: ontowhee@gmail.com
Date: 2025-03-26T09:45:33Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix some issues in contrib/spi/refint.c.
- 8cfbdf8f4dfb 18.0 landed
-
I send you a attach of my modified refint.c that
- d489fdfc7f4c 7.1.1 cited
Attachments
- v5-0001-Triggers-test-fix-with-the-invalid-cache-in-refin.patch (text/x-diff) patch v5-0001
Hi! Thank you for the review! > 3. Consider updating documentation for doc/src/contrib-spi.sgml, or any > file as appropriate, to reflect the changes. The changes have now been added to doc/src/contrib-spi.sgml. I also added a consideration note about interactions with BEFORE triggers. > 4. Are there any cases where check_primary_key() and > check_foreign_key() should be called using a BEFORE trigger? Will this > change break backwards compatibility? Consider adding a test with a > BEFORE trigger to ensure the error "must be fired by AFTER trigger" is > raised. The usage within BEFORE triggers appears to be entirely incorrect. The functions check_primary_key() and check_foreign_key() are intended for use in creating constraint triggers, which according to the documentation must be AFTER ROW triggers. Therefore, any cases using BEFORE triggers are invalid. I have updated the test so that it now raises the error "must be fired by AFTER trigger." Can you also help me with the patch status? What status should I move the patch to?