Re: Interest in a binary parameter type in PDO?
| From: | Matteo Beccati | Date: | Mon, 16 Jun 2025 14:35:53 +0000 |
| Subject: | Re: Interest in a binary parameter type in PDO? | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-127680@lists.php.net to get a copy of this message | ||
Hi Calvin,
On 16/06/2025 16:21, Calvin Buckley wrote:
On Jun 16, 2025, at 10:28 AM, Matteo Beccati <matteo@beccati.com> wrote:In an ideal world, yes. But I fear that ship has sailed, as the most used drivers have been using PARAM_LOB for binary fields since PDO has been designed, as far as I know. Perhaps we can make that clear by aliasing PARAM_BINARY to PARAM_LOB and fix the implementation for broken drivers? Cheers -- Matteo Beccati Development & Consulting - http://www.beccati.com/Hi, as mentioned in https://github.com/php/php-src/pull/15949 I still think that PARAM_LOB can safely be used as identifier for binary data, as pdo_mysql and pdo_pgsql do.I think PARAM_LOB and PARAM_LOB are orthogonal. Using i.e. ODBC as an example:+----------+------------+ | string | binary |+---------+----------+------------+ | LOB | SQL_CLOB | SQL_BLOB | +---------+----------+------------+ | not LOB | SQL_CHAR | SQL_BINARY | +---------+----------+------------+ Especially since LOBs may have different semantics (i.e. needing to be treated as a stream).