Skip to content

Remove driver specific support from ODBC #15727

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

NattyNarwhal
Copy link
Member

@NattyNarwhal NattyNarwhal commented Sep 3, 2024

See GH-15630 for motivation and some concerns. Looks like we can get rid of a bunch of ifdefs!

Additional ones I've had since this:

  • Should we remove the Db2 special casing?
  • There's some redundancy with the various fetch functions; this could be made into a common interface that the PHP functions call into.
  • It seems fetch hash works with all the driver managers, but not the custom ones.
  • SQL_TIMESTAMP is gated behind Adabas for some reason (in odbc_bindcols), even though it seems general? May need to look into how it gets converted to SQL_C_CHAR per ODBC ref.
  • HAVE_SQLDATASOURCES only gets set on Windows, need to test or assume on Unix ahahaha accidentally deleted it in a cleanup, added back

PDO_ODBC doesn't do this, and most of these drivers are not in use with
PHP, at least like this. Chances are these expose an ODBC driver you can
use with a normal driver manager like unixODBC or iODBC. If not, it can
be specified as a custom driver, though it does not include any
workarounds.

There might be some redundant definitions now as a result.

IBM Db2 is kept as a special case due to it also being in PDO_ODBC,
though I wonder how good of an idea this is.

See phpGH-15630
This would only be used on 68k classic Mac OS. Did PHP ever run there?
All supported driver managers can do extended fetches.
Copy link
Member

@cmb69 cmb69 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

I'm all for removing legacy cruft, especially early in the "new" master branch (i.e. in a couple of weeks). I can barely comment on the Unix specialties, though.

There's no justification behind as to why this should be.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants