You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browse filesBrowse the repository at this point in the historyBrowse files
authored
Add hstore transform, structured pg_raise, TRUNCATE/INSTEAD OF triggers, domain array/composite support (#29)
Four PL/Ruby-parity features, each verified against PostgreSQL 18 with the
full regression suite (25 plphp tests + jsonb_plphp + hstore_plphp, all green):
- hstore_plphp: a TRANSFORM FOR TYPE hstore mapping hstore <-> PHP associative
arrays (PHP null -> hstore NULL), companion to jsonb_plphp.
- pg_raise(level, message [, detail [, hint [, sqlstate]]]): attaches DETAIL,
HINT and a custom SQLSTATE like RAISE ... USING. Fields are preserved on a
caught PgError, through nested SPI propagation, and now at top-level uncaught
errors via a new field-stash bridge through the zend_bailout path -- which
also fixes uncaught errors previously collapsing to SQLSTATE XX000 and
losing DETAIL/HINT.
- TRUNCATE (statement) and INSTEAD OF (view) triggers: previously the trigger
handler errored on the unrecognized event/timing; $_TD now reports
'TRUNCATE' / 'INSTEAD OF', and INSTEAD OF returns drive the row.
- Domains over array/composite: classified through getBaseType so an array
domain arrives as (and returns) a PHP array; CHECK constraints still enforced.
Item deferred: applying transforms inside trigger/SETOF/composite/SPI rows
(plphp applies transforms only to top-level scalars today, as does jsonb) is a
broad tuple-I/O change left as separate future work.
Co-authored-by: Joshua (D) Drake <136637981+ChronicallyJD@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments