safeupdate
Require criteria for UPDATE and DELETE
safeupdate : Require criteria for UPDATE and DELETE
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 5820 | safeupdate | safeupdate | 1.5 |
ADMIN | ISC | C |
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
| --sL--- | No | Yes | Yes | No | no | no |
| Relationships | |
|---|---|
| See Also | pg_strict pg_savior pg_drop_events table_log block_copy_command pg_kpart plan_filter |
Packages
| Type | Repo | Version | PG Major Compatibility | Package Pattern | Dependencies |
|---|---|---|---|---|---|
| EXT | PGDG | 1.5 |
18 17 16 15 14 | safeupdate |
- |
| RPM | PGDG | 1.5 |
18 17 16 15 14 | safeupdate_$v |
- |
| DEB | PIGSTY | 1.5 |
18 17 16 15 14 | postgresql-$v-pg-safeupdate |
- |
| Linux / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PGDG 1.5 | PGDG 1.5 | PGDG 1.5 | PGDG 1.5 | PGDG 1.5 |
| el8.aarch64 | PGDG 1.5 | PGDG 1.5 | PGDG 1.5 | PGDG 1.5 | PGDG 1.5 |
| el9.x86_64 | PGDG 1.5 | PGDG 1.5 | PGDG 1.5 | PGDG 1.5 | PGDG 1.5 |
| el9.aarch64 | PGDG 1.5 | PGDG 1.5 | PGDG 1.5 | PGDG 1.5 | PGDG 1.5 |
| el10.x86_64 | PGDG 1.5 | PGDG 1.5 | PGDG 1.5 | PGDG 1.5 | PGDG 1.5 |
| el10.aarch64 | PGDG 1.5 | PGDG 1.5 | PGDG 1.5 | PGDG 1.5 | PGDG 1.5 |
| d12.x86_64 | PIGSTY 1.5 | PIGSTY 1.5 | PIGSTY 1.5 | PIGSTY 1.5 | PIGSTY 1.5 |
| d12.aarch64 | PIGSTY 1.5 | PIGSTY 1.5 | PIGSTY 1.5 | PIGSTY 1.5 | PIGSTY 1.5 |
| d13.x86_64 | PIGSTY 1.5 | PIGSTY 1.5 | PIGSTY 1.5 | PIGSTY 1.5 | PIGSTY 1.5 |
| d13.aarch64 | PIGSTY 1.5 | PIGSTY 1.5 | PIGSTY 1.5 | PIGSTY 1.5 | PIGSTY 1.5 |
| u22.x86_64 | PIGSTY 1.5 | PIGSTY 1.5 | PIGSTY 1.5 | PIGSTY 1.5 | PIGSTY 1.5 |
| u22.aarch64 | PIGSTY 1.5 | PIGSTY 1.5 | PIGSTY 1.5 | PIGSTY 1.5 | PIGSTY 1.5 |
| u24.x86_64 | PIGSTY 1.5 | PIGSTY 1.5 | PIGSTY 1.5 | PIGSTY 1.5 | PIGSTY 1.5 |
| u24.aarch64 | PIGSTY 1.5 | PIGSTY 1.5 | PIGSTY 1.5 | PIGSTY 1.5 | PIGSTY 1.5 |
| u26.x86_64 | PIGSTY 1.5 | PIGSTY 1.5 | PIGSTY 1.5 | PIGSTY 1.5 | PIGSTY 1.5 |
| u26.aarch64 | PIGSTY 1.5 | PIGSTY 1.5 | PIGSTY 1.5 | PIGSTY 1.5 | PIGSTY 1.5 |
Source
github.com/eradman/pg-safeupdate
pg-safeupdate-1.5.tar.gz
Install
Make sure PGDG repo available:
Install this extension with pig:
Config this extension to shared_preload_libraries:
This extension does not need CREATE EXTENSION DDL command
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.