Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:120795 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 46900 invoked from network); 12 Jul 2023 15:21:54 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 12 Jul 2023 15:21:54 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 0A01618050B for ; Wed, 12 Jul 2023 08:21:53 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS47066 71.19.146.0/24 X-Spam-Virus: No X-Envelope-From: Received: from supercat.cmpct.info (supercat.cmpct.info [71.19.146.230]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 12 Jul 2023 08:21:52 -0700 (PDT) Received: from smtpclient.apple (fctnnbsc38w-47-55-87-230.dhcp-dynamic.fibreop.nb.bellaliant.net [47.55.87.230]) by supercat.cmpct.info (Postfix) with ESMTPSA id 24FAA3FDDA; Wed, 12 Jul 2023 15:21:45 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.600.7\)) In-Reply-To: Date: Wed, 12 Jul 2023 12:21:33 -0300 Cc: internals@lists.php.net Content-Transfer-Encoding: quoted-printable Message-ID: <264FF484-6336-4519-944E-60D7477F5318@cmpct.info> References: <44E4F0BD-C56B-4817-B809-AE18622ACE8A@cmpct.info> To: Dan Ackroyd X-Mailer: Apple Mail (2.3731.600.7) Subject: Re: [PHP-DEV] Proposal: Binary type for PDO From: calvin@cmpct.info (Calvin Buckley) > On Jul 9, 2023, at 11:29 AM, Dan Ackroyd = wrote: >=20 > On Fri, 7 Jul 2023 at 18:39, Calvin Buckley wrote: >>=20 >> I'd like to hear any oversights, and what could be done to take this >> further. >=20 > I think someone needs to write some code and some tests, and see what = happens. >=20 > It's possible that PARAM_BINARY could be used across all of the PDO > drivers that PHP ships with, and for each of them the behaviour with > that option is sensible. >=20 > It's also possible that the behaviour of binary parameters is bespoke > to each of the drivers, and that it isn't possible to use PARAM_BINARY > in a DB agnostic way. >=20 > The most realistic way to find out which option is more real, is to > write the code + tests....which would need to be done anyway, even > assuming the best case scenario. I have a WIP PR here: https://github.com/php/php-src/pull/11674 I have not implemented MySQL/Postgres/OCI/Firebird support, but I have tests for ODBC, DBLIB, and SQLite. I think your suspicions about it being bespoke might be correct, although the exercise isn=E2=80=99t for = naught. Even if a PARAM_BINARY isn=E2=80=99t realistic to implement, it still = identifies and has some fixes for PDO_ODBC and PDO_DBLIB that could be used independently from any PARAM_BINARY support. Further review and me figuring out the other drivers could help here.=