Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:113801 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 37233 invoked from network); 26 Mar 2021 14:54:59 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 26 Mar 2021 14:54:59 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 559B01804DD for ; Fri, 26 Mar 2021 07:51:16 -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=0.8 required=5.0 tests=BAYES_50,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail.cmpct.info (supercat.cmpct.info [71.19.146.230]) by php-smtp4.php.net (Postfix) with ESMTP for ; Fri, 26 Mar 2021 07:51:15 -0700 (PDT) Received: from [192.168.2.29] (fctnnbsc38w-142-167-240-56.dhcp-dynamic.fibreop.nb.bellaliant.net [142.167.240.56]) by mail.cmpct.info (Postfix) with ESMTPSA id A78213FC4E for ; Fri, 26 Mar 2021 14:51:13 +0000 (-00) Message-ID: To: internals@lists.php.net Date: Fri, 26 Mar 2021 11:51:11 -0300 Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.1 (3.38.1-1.fc33) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Improvements to PDO_ODBC From: calvin@cmpct.info (Calvin Buckley) Hello internals@, I've been looking into improving PDO_ODBC; specifically, bringing it up to parity with other drivers, as well as dealing with its quirks. The company I work for supports PHP on IBM i, and while we maintain the native database drivers for the platform, we (and IBM) have been recommending new applications migrate to ODBC. However, the procedural ODBC driver does have some limitations like no in/out parameters (which is a very common thing with stored procedures here, unfortunately). PDO_ODBC does support this, but we've noticed some issues: * Persistent connections aren't checked, even though the procedural ODBC driver does. This has bitten some of our clients, so we have a patch for them that does impement this; this is PR GH-6805. * Many of the connection attributes don't seem to be implemented; some of these seem trivial to implement, others less so. * In/out parameters require users to remember to specify size and add one for the null terminator. I'm not familar with other ODBC drivers to call this a driver/platform quirk, PDO_ODBC limitation, or something else, but figuring out a good solution for this would make life easier for users. * As always, ODBC being a generic abstraction later itself bites us (i.e no standard way to get last ID). I'm curious if anyone has suggestions for what to be done or how to get these done. Regards, Calvin *