refacto: morbac_pg -> pg_morbac
This commit is contained in:
+9
-9
@@ -4,34 +4,34 @@
|
||||
|
||||
This extension uses a single-source version approach:
|
||||
|
||||
- **Version source of truth**: `morbac_pg.control` (the `default_version` field)
|
||||
- **Development file**: `morbac_pg.sql` (unversioned, for daily work)
|
||||
- **Release files**: `morbac_pg--X.Y.Z.sql` (generated, git-ignored)
|
||||
- **Version source of truth**: `pg_morbac.control` (the `default_version` field)
|
||||
- **Development file**: `pg_morbac.sql` (unversioned, for daily work)
|
||||
- **Release files**: `pg_morbac--X.Y.Z.sql` (generated, git-ignored)
|
||||
|
||||
## Daily Development
|
||||
|
||||
1. **Edit**: Work on `morbac_pg.sql` (no version numbers in the file)
|
||||
1. **Edit**: Work on `pg_morbac.sql` (no version numbers in the file)
|
||||
2. **Test**: Run `make test` to test changes in a temporary database
|
||||
3. **Commit**: Commit `morbac_pg.sql` to git regularly
|
||||
3. **Commit**: Commit `pg_morbac.sql` to git regularly
|
||||
|
||||
## Release Process
|
||||
|
||||
When ready to release a new version:
|
||||
|
||||
1. **Update version**: Edit `morbac_pg.control` and change `default_version`
|
||||
1. **Update version**: Edit `pg_morbac.control` and change `default_version`
|
||||
```
|
||||
default_version = '1.1.0'
|
||||
```
|
||||
|
||||
2. **Create release**: Run `make release`
|
||||
- Reads version from `.control` file
|
||||
- Copies `morbac_pg.sql` → `morbac_pg--X.Y.Z.sql`
|
||||
- Copies `pg_morbac.sql` → `pg_morbac--X.Y.Z.sql`
|
||||
|
||||
3. **Test**: Run `make test` with the versioned file
|
||||
|
||||
4. **Tag in git**:
|
||||
```bash
|
||||
git add morbac_pg.control morbac_pg--X.Y.Z.sql
|
||||
git add pg_morbac.control pg_morbac--X.Y.Z.sql
|
||||
git commit -m "Release vX.Y.Z"
|
||||
git tag vX.Y.Z
|
||||
git push origin main --tags
|
||||
@@ -42,7 +42,7 @@ When ready to release a new version:
|
||||
For version migrations, create upgrade scripts:
|
||||
```bash
|
||||
# Example: upgrade from 1.0.0 to 1.1.0
|
||||
touch morbac_pg--1.0.0--1.1.0.sql
|
||||
touch pg_morbac--1.0.0--1.1.0.sql
|
||||
```
|
||||
|
||||
These contain only the ALTER/ADD statements needed for the upgrade.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# morbac_pg Documentation
|
||||
# pg_morbac Documentation
|
||||
|
||||
Complete technical documentation for the Multi-OrBAC PostgreSQL extension.
|
||||
|
||||
@@ -17,7 +17,7 @@ Complete technical documentation for the Multi-OrBAC PostgreSQL extension.
|
||||
|
||||
### Design Principles
|
||||
|
||||
morbac_pg is built on these principles:
|
||||
pg_morbac is built on these principles:
|
||||
|
||||
1. **Pure PostgreSQL** - No external dependencies (except pgcrypto)
|
||||
2. **Schema Isolation** - All objects in `morbac` schema
|
||||
@@ -889,7 +889,7 @@ CREATE TABLE app.delegation_audit (
|
||||
|
||||
### Comparison: Multi-OrBAC vs Traditional RBAC
|
||||
|
||||
| Aspect | Traditional RBAC | Multi-OrBAC (morbac_pg) |
|
||||
| Aspect | Traditional RBAC | Multi-OrBAC (pg_morbac) |
|
||||
|--------|-----------------|-------------------------|
|
||||
| **Multi-tenancy** | Single tenant or complex workarounds | Native multi-organization |
|
||||
| **Prohibition** | No standard support | First-class, always wins |
|
||||
|
||||
+3
-3
@@ -1,10 +1,10 @@
|
||||
# Performance Optimization Guide
|
||||
|
||||
This guide explains the performance optimizations built into morbac_pg and how to use them effectively.
|
||||
This guide explains the performance optimizations built into pg_morbac and how to use them effectively.
|
||||
|
||||
## Performance Architecture
|
||||
|
||||
morbac_pg includes several layers of optimization:
|
||||
pg_morbac includes several layers of optimization:
|
||||
|
||||
1. **Materialized Views** - Precomputed hierarchy transitive closures
|
||||
2. **Authorization Cache** - Configurable TTL cache for authorization decisions (default: 5 minutes)
|
||||
@@ -414,7 +414,7 @@ $$;
|
||||
|
||||
## Conclusion
|
||||
|
||||
With these optimizations, morbac_pg can handle:
|
||||
With these optimizations, pg_morbac can handle:
|
||||
- **>1000 authorization checks/second** (cached)
|
||||
- **>100 authorization checks/second** (uncached)
|
||||
- **Complex hierarchies** (10+ levels deep)
|
||||
|
||||
Reference in New Issue
Block a user