Re: [fixed] Trigger test
От | Paul Jungwirth |
---|---|
Тема | Re: [fixed] Trigger test |
Дата | |
Msg-id | 766da800-4884-41a9-8e8e-71d131dc599c@illuminatedcomputing.com обсуждение исходный текст |
Ответ на | Re: [fixed] Trigger test (Dmitrii Bondar <d.bondar@postgrespro.ru>) |
Ответы |
Re: [fixed] Trigger test
|
Список | pgsql-hackers |
Hi Dmitrii, Thanks for the quick update! On 3/26/25 02:45, Dmitrii Bondar wrote: >> 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. This looks good. I have a couple small grammar suggestions. This: + To use, create a <literal>AFTER INSERT OR UPDATE</literal> trigger using this should be: + To use, create an <literal>AFTER INSERT OR UPDATE</literal> trigger using this and this: + To use, create a <literal>AFTER DELETE OR UPDATE</literal> trigger using this should be this: + To use, create an <literal>AFTER DELETE OR UPDATE</literal> trigger using this Also re this part of the patch: @@ -592,10 +598,15 @@ check_foreign_key(PG_FUNCTION_ARGS) } else { + const char* operation; + + if (action == 'c') + operation = is_update ? "updated" : "deleted"; + else + operation = "set to null"; #ifdef REFINT_VERBOSE elog(NOTICE, "%s: " UINT64_FORMAT " tuple(s) of %s are %s", - trigger->tgname, SPI_processed, relname, - (action == 'c') ? "deleted" : "set to null"); + trigger->tgname, SPI_processed, relname, operation); #endif } args += nkeys + 1; /* to the next relation */ We can put all the new lines inside the #ifdef, can't we? > Can you also help me with the patch status? What status should I move the patch to? I think if you make those changes we should mark this as Ready for Committer. Yours, -- Paul ~{:-) pj@illuminatedcomputing.com
В списке pgsql-hackers по дате отправления: