modeshape_bson
modeshape_bson · PostgreSQL extension to convert ModeShape BSON to and from JSON
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 100626 | modeshape_bson | modeshape_bson | 1.0 | UTIL | Apache-2.0 | C |
Usage
Sources:
modeshape_bson 1.0 converts ModeShape BSON stored as bytea to canonical Extended JSON text and converts JSON text back to BSON. It was designed to place a PostgreSQL JSONB table behind a writable proxy table expected by ModeShape.
Test a conversion
The returned JSON is libbson’s canonical Extended JSON, so textual formatting and representations may differ after a round trip even when values remain equivalent. Validate every BSON type used by the application, including dates, binary values, numeric widths, object identifiers, arrays, nulls, and nested documents.
Legacy format and proxy-table risk
Upstream documents a ModeShape repository:info record whose $date value uses BSON type 9 instead of the usually observed ISO string and notes uncertainty about writing it. Treat that record and all uncommon types as migration blockers until byte-for-byte and semantic tests pass.
The source last changed in 2018 and vendors an old Mongo C driver/libbson tree. It publishes no current PostgreSQL, ModeShape, or libbson compatibility matrix. The suggested writable-view design uses rules to redirect all reads and writes, which adds concurrency, privilege, trigger, and error-propagation complexity. Use a least-privileged owner, avoid credentials in stored configuration examples, retain raw source bytes during migration, and prefer a maintained application-side converter unless this native code is rebuilt and audited for the exact platform.