Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/aquameta/meta_triggers

PostgreSQL Extension: Insert, update and delete triggers that make the meta extension writable
https://github.com/aquameta/meta_triggers

aquameta postgresql-extension system-catalog triggers

Last synced: 3 months ago
JSON representation

PostgreSQL Extension: Insert, update and delete triggers that make the meta extension writable

Awesome Lists containing this project

README

        

# meta_triggers
This extension makes the [meta](https://github.com/aquametalabs/meta) extension writable, by adding insert, update and delete triggers to its views. Typical DDL operations like `create schema foo` can be performed using insert update and delete, e.g. `insert into meta.schema(name) values ('foo')`.

# Install

1. Install the [meta](https://github.com/aquametalabs/meta) extension.
2. From a shell:
```sh
cd meta_triggers/
make
sudo make install
```
3. From a `pgsql` prompt:
```sql
create extension meta_triggers;
```

# Usage
```
aquameta=# insert into meta.schema(name) values ('my_new_schema');
INSERT 0 1
aquameta=# update meta.schema set name='my_newer_schema' where name='my_new_schema';
UPDATE 1
aquameta=# delete from meta.schema where name='my_newer_schema';
DELETE 1
```
# Documentation

A complete list of supported views is available in the [meta](https://github.com/aquametalabs/meta) extension.