Bug #80311 [NEW]: jsonb operators not supported
From: boan at jfmedier dot dk
Operating system:
PHP version: 7.2.34
Package: PDO PgSQL
Bug Type: Bug
Bug description:jsonb operators not supported
Description:
------------
When trying to query a jsonb field in postgresql with the questionmark
operator, we get error code 42601.
`$pdo->query("SELECT * FROM term_template tt WHERE (sites->0) ?
'site_id'");`
`"ERROR: syntax error at or near "$1"
LINE 1: SELECT * FROM term_template tt WHERE (sites->0) $1
'site_id'..."`
See jsonb operators here:
https://www.postgresql.org/docs/10/functions-json.html
The query works when executed within a database tool.
Test script:
---------------
Fixture data in DB "sites" column:
[{"site_id": "example.org"}]
--
Edit bug report at https://bugs.php.net/bug.php?id=80311&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=80311&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=80311&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=80311&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=80311&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=80311&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=80311&r=support
Expected behavior: https://bugs.php.net/fix.php?id=80311&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=80311&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=80311&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=80311&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=80311&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=80311&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=80311&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=80311&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=80311&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=80311&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=80311&r=mysqlcfg
Thread (1 message)
- boan at jfmedier dot dk