LogoLogo
BlogDiscordGitHubDoltgres
  • Introduction
    • What is Doltgres?
    • Installation
    • Getting Started
  • Concepts
    • Git
      • Commits
      • Log
      • Diff
      • Branch
      • Merge
      • Conflicts
      • Remotes
      • Working Set
    • SQL
      • Databases
      • Schema
      • Tables
      • Primary Keys
      • Types
      • Indexes
      • Views
      • Constraints
      • Triggers
      • Functions
      • Procedures
      • Users/Grants
      • Transactions
      • System Variables
    • RDBMS
      • Server
      • Backups
      • Replication
  • Guides
    • Cheat Sheet
    • Replication from Postgres
  • Reference
    • Running the Server
      • Configuration
      • Access Management
      • Branch Permissions
      • Backups
      • Garbage Collection
      • Metrics
      • Replication
      • Troubleshooting
    • Version Control Features
      • Using Branches
      • Merges
      • Querying History
      • Using Remotes
      • Functions
      • System Tables
      • System Variables
    • SQL Language Support
      • Supported Functions and Operators
      • Supported Types
      • Supported SQL Commands
      • System Catalog Schema
    • Supported Clients
      • Programmatic
    • Benchmarks
      • Correctness
      • Latency
Powered by GitBook
On this page
  • What is a Trigger?
  • How to use Triggers
  • Interaction with Doltgres Version Control
  1. Concepts
  2. SQL

Triggers

PreviousConstraintsNextFunctions

Last updated 1 year ago

What is a Trigger?

Triggers are SQL statements you can set to run every time a row is inserted, updated, or deleted from a particular table. Triggers receive the value of the row being inserted, updated, or deleted like a parameter, and can change it in some cases.

Database users create triggers. Triggers are schema. Triggers are stored along with other schema elements in the database.

How to use Triggers

Triggers are a general tool, but they are most commonly used to enforce complex constraints that can't be expressed by foreign keys, nullness, types, or the check syntax.

Triggers in Doltgres are not yet supported. Check back for updates.

Interaction with Doltgres Version Control

Triggers are versioned in the dolt_schemas table just like . You add and commit that table just like any other changed table after you create or modify a trigger.

views