Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Database trigger
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== PostgreSQL === Introduced support for triggers in 1997. The following functionality in [[SQL:2003]] was previously not implemented in PostgreSQL: * SQL allows triggers to fire on updates to specific columns; As of version 9.0 of PostgreSQL this feature is also implemented in PostgreSQL. * The standard allows the execution of a number of SQL statements other than [[Select (SQL)|SELECT]], [[Insert (SQL)|INSERT]], [[Update (SQL)|UPDATE]], such as CREATE TABLE as the triggered action. This can be done through creating a stored procedure or function to call CREATE TABLE.<ref>{{Cite web|url=https://www.postgresql.org/docs/9.0/sql-createtrigger.html|title=PostgreSQL: Documentation: 9.0: CREATE TRIGGER|website=www.postgresql.org|date=8 October 2015}}</ref> Synopsis: <syntaxhighlight lang="postgresql"> CREATE TRIGGER name { BEFORE | AFTER } { event [ OR ... ] } ON TABLE [ FOR [ EACH ] { ROW | STATEMENT } ] EXECUTE PROCEDURE funcname ( arguments ) </syntaxhighlight>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)