Re: Interest in a binary parameter type in PDO?
| From: | Calvin Buckley | Date: | Mon, 16 Jun 2025 14:21:38 +0000 |
| Subject: | Re: Interest in a binary parameter type in PDO? | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-127677@lists.php.net to get a copy of this message | ||
On Jun 16, 2025, at 10:28 AM, Matteo Beccati <matteo@beccati.com> wrote:
>
> 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_BINARY 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).