pg_snakeoil
The PostgreSQL Antivirus
pg_snakeoil : The PostgreSQL Antivirus
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 7380 | pg_snakeoil | pg_snakeoil | 1.4 |
SEC | PostgreSQL | C |
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
| --sLd-r | No | Yes | Yes | Yes | yes | no |
| Relationships | |
|---|---|
| See Also | pg_roast pg_permissions pg_auditor pgaudit set_user pgauditlogtofile pgmemento table_log pg_readonly |
require clamV libs
Packages
| Type | Repo | Version | PG Major Compatibility | Package Pattern | Dependencies |
|---|---|---|---|---|---|
| EXT | MIXED | 1.4 |
18 17 16 15 14 | pg_snakeoil |
- |
| RPM | PIGSTY | 1.4 |
18 17 16 15 14 | pg_snakeoil_$v |
- |
| DEB | PGDG | 1.4 |
18 17 16 15 14 | postgresql-$v-snakeoil |
- |
| Linux / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PIGSTY 1.4 | PIGSTY 1.4 | PIGSTY 1.4 | PIGSTY 1.4 | PIGSTY 1.4 |
| el8.aarch64 | PIGSTY 1.4 | PIGSTY 1.4 | PIGSTY 1.4 | PIGSTY 1.4 | PIGSTY 1.4 |
| el9.x86_64 | PGDG 1.4 | PGDG 1.4 | PGDG 1.4 | PGDG 1.4 | PGDG 1.4 |
| el9.aarch64 | PGDG 1.4 | PGDG 1.4 | PGDG 1.4 | PGDG 1.4 | PGDG 1.4 |
| el10.x86_64 | PGDG 1.4 | PGDG 1.4 | PGDG 1.4 | PGDG 1.4 | PGDG 1.4 |
| el10.aarch64 | PGDG 1.4 | PGDG 1.4 | PGDG 1.4 | PGDG 1.4 | PGDG 1.4 |
| d12.x86_64 | PGDG 1.4 | PGDG 1.4 | PGDG 1.4 | PGDG 1.4 | PGDG 1.4 |
| d12.aarch64 | PGDG 1.4 | PGDG 1.4 | PGDG 1.4 | PGDG 1.4 | PGDG 1.4 |
| d13.x86_64 | PGDG 1.4 | PGDG 1.4 | PGDG 1.4 | PGDG 1.4 | PGDG 1.4 |
| d13.aarch64 | PGDG 1.4 | PGDG 1.4 | PGDG 1.4 | PGDG 1.4 | PGDG 1.4 |
| u22.x86_64 | PGDG 1.4 | PGDG 1.4 | PGDG 1.4 | PGDG 1.4 | PGDG 1.4 |
| u22.aarch64 | PGDG 1.4 | PGDG 1.4 | PGDG 1.4 | PGDG 1.4 | PGDG 1.4 |
| u24.x86_64 | PGDG 1.4 | PGDG 1.4 | PGDG 1.4 | PGDG 1.4 | PGDG 1.4 |
| u24.aarch64 | PGDG 1.4 | PGDG 1.4 | PGDG 1.4 | PGDG 1.4 | PGDG 1.4 |
| u26.x86_64 | PGDG 1.4 | PGDG 1.4 | PGDG 1.4 | PGDG 1.4 | PGDG 1.4 |
| u26.aarch64 | PGDG 1.4 | PGDG 1.4 | PGDG 1.4 | PGDG 1.4 | PGDG 1.4 |
Source
github.com/credativ/pg_snakeoil
pg_snakeoil-1.4.tar.gz
Install
Make sure PGDG and PIGSTY repo available:
Install this extension with pig:
Config this extension to shared_preload_libraries:
Create this extension with:
Usage
pg_snakeoil provides ClamAV virus scanning of data stored in PostgreSQL without interfering with normal database operations.
Functions
| Function | Returns | Description |
|---|---|---|
so_is_infected(text) |
bool |
Check if text data matches a virus signature |
so_is_infected(bytea) |
bool |
Check if bytea data matches a virus signature |
so_virus_name(text) |
text |
Return virus name if infected, empty string otherwise |
so_virus_name(bytea) |
text |
Return virus name if infected, NULL otherwise |
so_update_signatures() |
bool |
Reload virus signatures, true if changed |