Re: [fixed] Trigger test

From: Lilian Ontowhee <ontowhee(at)gmail(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Cc: Dmitrii Bondar <d(dot)bondar(at)postgrespro(dot)ru>
Subject: Re: [fixed] Trigger test
Date: 2025-03-25 20:48:23
Message-ID: 174293570374.60294.13024599409215069922.pgcf@coridan.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

The following review has been posted through the commitfest application:
make installcheck-world: not tested
Implements feature: not tested
Spec compliant: not tested
Documentation: not tested

Hi Dmitrii,

Paul Jungwirth and I reviewed this patch, and here are our comments:

1. The patch applies and tests pass.
2. The patch fixes a bug in contrib/spi, which is not really a practical extension, but rather examples of how to use SPI. The contrib/spi directory actually has four extensions: refint, autoinc, insert_username, and moddatetime. The patch is for refint, which is a way you could implement foreign keys if it weren't built in to Postgres.
3. Consider updating documentation for doc/src/contrib-spi.sgml, or any file as appropriate, to reflect the changes.
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.

Thank you!

The new status of this patch is: Waiting on Author

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2025-03-25 20:56:53 Re: AIO v2.5
Previous Message Euler Taveira 2025-03-25 20:34:16 Re: Enhance 'pg_createsubscriber' to retrieve databases automatically when no database is provided.