safeupdate
Require criteria for UPDATE and DELETE
Repository
eradman/pg-safeupdate
https://github.com/eradman/pg-safeupdate
Source
pg-safeupdate-1.5.tar.gz
pg-safeupdate-1.5.tar.gz
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
safeupdate | 1.5 | ADMIN | ISC | C |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 5820 | safeupdate | No | Yes | Yes | No | No | No | - |
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | PGDG | 1.5 | 1817161514 | safeupdate | - |
| RPM | PGDG | 1.5 | 1817161514 | safeupdate_$v | - |
| DEB | PIGSTY | 1.5 | 1817161514 | postgresql-$v-pg-safeupdate | - |
Build
You can build the DEB packages for safeupdate using pig build:
Install
You can install safeupdate directly. First, make sure the PGDG repository is added and enabled:
Install the extension using pig or apt/yum/dnf:
Install
pig
dnf
apt
Preload:
Usage
The safeupdate extension prevents accidental mass data changes by raising an error whenever UPDATE or DELETE statements are executed without a WHERE clause.
Activation
Behavior
Administrative Override
CTE-based modifications without WHERE conditions are also blocked. The extension is particularly useful with PostgREST or other systems that provide direct write access to the database.
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)