hstore_plphp
plphp · Transform between hstore and PHP associative arrays for PL/php
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 101859 | hstore_plphp | plphp | 1.0 | LANG | PostgreSQL | C |
PostgreSQL · 11, 12, 13, 14, 15, 16, 17, 18
Usage
Sources:
hstore_plphp transforms PostgreSQL hstore values to and from native PHP associative arrays for functions written in plphp. PHP string keys and string-or-null values map to the corresponding hstore entries.
Core Workflow
CASCADE creates the required hstore and plphp extensions when available. Only functions that declare TRANSFORM FOR TYPE hstore use native PHP arrays. A PHP null value maps to an SQL NULL value inside hstore, not to the text string NULL.
Boundaries
hstore_plphp inherits the untrusted, superuser-only security model of plphp; it does not sandbox PHP. The transform covers supported arguments, results, nested composite or array values, set-returning rows, and trigger rows, while SPI result rows keep normal text conversion. Test key/value encoding and null behavior before replacing explicit text parsing.
The transform’s control version is 1.0 and it ships in PL/php 2.6.0. It needs no preload, but requires a working PHP embed SAPI and plphp on PostgreSQL 11 through 18.