---
title: "update postgres trigger"
method: POST
path: "/w/{workspace}/postgres_triggers/update/{path}"
tags: ["postgres_trigger"]
---

# update postgres trigger

`POST /w/{workspace}/postgres_triggers/update/{path}`

## Path parameters

- `workspace` string, required
- `path` string, required

## Request body

- EditPostgresTrigger
  - `replication_slot_name` string, required — Name of the PostgreSQL logical replication slot to use
  - `publication_name` string, required — Name of the PostgreSQL publication to subscribe to for change data capture
  - `path` string, required — The unique Windmill path for this trigger. Must be of the form `u/<user>/<path>` or `f/<folder>/<path>`. This is the trigger object path, not the HTTP route path.
  - `script_path` string, required — Path to the script or flow to execute when database changes are detected
  - `is_flow` boolean, required — True if script_path points to a flow, false if it points to a script
  - `mode` 'enabled' | 'disabled' | 'suspended' — job trigger mode
  - `postgres_resource_path` string, required — Path to the PostgreSQL resource containing connection configuration
  - `publication` PublicationData
    - `table_to_track` Relations[]
      - `schema_name` string, required
      - `table_to_track` object[], required
        - `table_name` string, required
        - `columns_name` string[]
        - `where_clause` string
    - `transaction_to_track` string[], required
  - `error_handler_path` string — Path to a script or flow to run when the triggered job fails
  - `error_handler_args` ScriptArgs — The arguments to pass to the script or flow
  - `retry` Retry — unresolved $ref
  - `permissioned_as` string — The user or group this trigger runs as. Used during deployment to preserve the original trigger owner.
  - `preserve_permissioned_as` boolean — When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it.
  - `labels` string[]

## Response `200`

postgres trigger updated

---

[API](https://skmtc.net/windmill/apis/windmill-api.md) · [All operations](https://skmtc.net/windmill/apis/windmill-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/windmill/windmill-api/revisions/096d6a8830b7/schema)
