Questions tagged [trigger]
Procedural code automatically executed in response to a database event.
1,529 questions
0 votes
1 answer
32 views
Enabled always statement level trigger on logical replication target does not seem to fire
Overview I have the following setup using Azure PostgreSQL flexible server v17: a main database containing a certain table included in the table list for a logical replication publication a replica ...
0 votes
0 answers
16 views
How to solve ClassNotFoundException problem when creating trigger in Apache IoTDB 1.3?
I'm now in Apache IoTDB version 1.3.0 and want to create a simple trigger but encountering class loading issues. My trigger code: `package com.example.trigger; import org.apache.iotdb.trigger.api....
5 votes
1 answer
206 views
Order of execution of row-level triggers for multi-row INSERT
I have a trigger: AFTER INSERT OR DELETE ON cryptokeys2020 FOR EACH ROW EXECUTE FUNCTION update_domains_dnssec(); Then I: INSERT INTO cryptokeys2020 (...) SELECT ... Example: cryptokeys2020 is empty ...
0 votes
1 answer
102 views
How to add row numbers to deleted and inserted in after update trigger without sorting?
Consider the following example: Create Table Test ([id] int, [value] varchar(max)) Go Create Table Test_Log ([row_id] int, [action] varchar(11), [timestamp] DateTime default GetDate(), [id] int, [...
1 vote
1 answer
59 views
Encrypting passwords in trigger
Using MySQL, for the Staff (User) table, I am using the triggers (Before Insert and Before Update) to encrypt the passwords that are saved. Is there anything wrong with this approach?
0 votes
2 answers
270 views
How to debug: "Trigger returned a resultset and/or was running with SET NOCOUNT OFF"?
I have a problem with trigger which produces the following error message Trigger returned a resultset and/or was running with SET NOCOUNT OF The trigger is structured like this: CREATE TRIGGER ...
0 votes
0 answers
30 views
Help with Creating an ERD and Logical Data Model for a Medical Management Application
A social security organization wishes to develop an application to manage patients, their attending a generalist, and specialist doctors. A person is either a beneficiary or a doctor; a doctor can ...
3 votes
6 answers
672 views
Data sanitation options on INSERT or UPDATE
The answer in this post is pretty much what I did to get my problem: SQL Server trigger before insert or update depend on value I have a CUSTOMER table that has multiple triggers attached. One of ...