[php-src] Issue #15630: Look into supported driver managers for ODBC extension and how we handle them
| From: | NattyNarwhal | Date: | Thu, 29 Aug 2024 00:06:19 +0000 |
| Subject: | [php-src] Issue #15630: Look into supported driver managers for ODBC extension and how we handle them | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-247625@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/15630
Author: NattyNarwhal
### Description
Currently, we have a different set of supported driver managers on Unix platforms between the two
ODBC extensions. On Windows, they just use the system driver manager.
PDO_ODBC supports:
- unixODBC
- iODBC
- using a generic ODBC driver directly
- and the Db2 driver using that generic driver infra w/ a special case in build system
- (Zend seems to use this on IBM i to link with libdb400, but this is kinda gross; ibm_db2 exists
as an extension, and you can also use the Client Access ODBC driver on i nowadays)
Procedural [supports](https://www.php.net/manual/en/odbc.installation.php) (those flags are out of
date, birdstep is gone at least, should file doc-en bug):
- unixODBC
- iODBC
- Db2 directly (this is just an ODBC or SQL/CLI library)
- Empress directly (seems to be some embedded DB?)
- Solid directly (same deal as Empress)
- DBMaker directly (some Chinese RDBMS?)
- Adabas D directly (some German RDBMS?)
- SAP DB directly (does this still exist/rebranded? results for HANA massively overshadow this)
- Easysoft OOB (looks to be a way to use an ODBC driver remotely?) directly
- generic
They also handle driver (manager) variance differently; procedural has a lot more ifdef for using
things directly.
A common pattern I noticed is procedural has grown many special case build and ifdef options for
using an ODBC driver directly. I'm not sure if this is something we want to encourage, since a
driver manager has a lot of benefits (tracing, runtime switching of drivers, etc), though linking
directly to a driver might be useful with those embedded databases. We could limit support for
linking with a driver directly to only the generic case; this would put PDO and procedural at parity
and simplify documentation and build system. I'm also unsure of how many of these are still in
popular use to justify special casing them.
tl;dr: For 8.5/9.0, we should consider probably paring down the supported libraries to use ODBC with
down to unixODBC, iODBC, and specifying an ODBC driver manually. I'd like to hear from users of
drivers too.
### PHP Version
PHP 8.4-DEV
### Operating System
macOS 14.6.1