Talk:Database trigger

message: Are triggers described by SQL93?  What systems are compliant? Are these various features of various servers compliant or vendor extensions?
 
:Triggers where added in the SQL-2008 standard.
:Why are the general code examples proprietary and not ANSI SQL compliant? Should really by changed! Fjerdingen (talk) 21:17, 10 August 2017 (UTC)
thread_title:  standards 

message: Imagine if a trigger was a method on an object.. When an object is modified, the 
trigger method is executed which then calls other objects and maintains invariants 
in the datastructure (garbage collection). Thus a trigger is nothing more than a precondition of a transaction to a database table (or an object).. However you like to look at it..
:Some other languages have this, in the form of implied getters/setters or properties. API-wise, you think you're modifying public attributes; internally, you cause a getter or setter to be called, which has the option to make the requested change, throw an exception, make a different change, call additional code, etc. Two examples: Borland (CodeGear?)'s extended C++/VCL stuff lets you create properties on TObject descendants that look like simple variables but can optionall call getters and setters (doesn't have to be both), and in Javascript, the 'host' objects (window, XHR, etc.) exposed into JS may look like they have simple attributes, but on the other side of the API, there are actually getters/setters being called.Unordained (talk) 19:46, 30 April 2010 (UTC)
thread_title:  a musing 

message: We should add an explanation and an example for this problem.  Additionally, it may be good to have some information on the behavior of different systems, i.e. can such errors occur or are they prevented. --Stolze 18:15, 19 November 2006 (UTC)
thread_title:  mutating table errors 

message: After searching the internet for hours trying to figure out how to access data from the affected rows for conditional-trigger-logic, I stumbled upon MSDN's documentation of Inserted and Deleted tables, which store these values for the trigger incase it needs them. I added a small reference to these tables, but the comments I left could be worked over a little better.
I felt they were relevant here since it is mentioned that Triggers don't have parameters or arguments - thus the user should use the Inserted and Deleted tables for conditional-logic.  —Preceding unsigned comment added by Sampsonvideos (talk • contribs) 19:24, 26 September 2007 (UTC)
thread_title:  Microsoft SQL Server 'Inserted' and 'Deleted' Tables 

message: According to the SQL documentation at least their server has the abilitiy to rollback transactions
URL: http://msdn.microsoft.com/msdnmag/issues/03/12/DataPoints/
Can someone please check/clarify this?  —Preceding unsigned comment added by 141.44.228.148 (talk) 15:08, 11 January 2008 (UTC)
thread_title:  No rollback of transactions via trigger? 

message: This section is a bit vague/confusing. You're left with the question so what triggers does PostgreSQL support? Lunchsure (talk) 20:27, 28 April 2008 (UTC)
thread_title:  Triggers in PostgreSQL 

message: Removed the part where it says: "PostgreSQL's database-level constraints may perform a similar function to a TRANSACTION COMMIT trigger, though they are oriented toward detecting and preventing disallowed conditions, not performing arbitrary operations."
Because PostgreSQL does not have database-level constraints (CREATE ASSERTION) (if it does, please add a reference that backups that claim).  —Preceding unsigned comment added by 201.155.6.245 (talk) 14:58, 31 March 2010 (UTC)
replies: text: My mistake. I think I was remembering the ability to defer constraints (which may be limited to foreign key constraints at the moment?) and the ability to create deferred constraint triggers. You could probably hack something up, where all tables have triggers that cause one central table's deferred constraint trigger to fire, effectively giving you on-commit triggers, but that'd be a mess, and speculative, and therefore not worthy of the main article. Thanks for catching it.Unordained (talk) 19:20, 14 April 2010 (UTC)
thread_title:  Postgresql does not support database level constraints 

message: The article draws an implicit distinction between DDL triggers and DML triggers but then doesn't define DML (doesn't even cross-link to the Wikipedia article on DML).   I've added this cross-link and made the distinction explicit.
Ross Fraser (talk) 16:36, 20 April 2010 (UTC)
thread_title:  Inconsistent Terminology