oracle / python-oracledb

Python driver for Oracle Database conforming to the Python DB API 2.0 specification. This is the renamed, new major release of cx_Oracle

Home Page:https://oracle.github.io/python-oracledb

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add way to handle DPY-3007: database type "DB_TYPE_INTERVAL_YM" is not supported

rudyryk opened this issue · comments

  1. Describe your new request in detail

As known and described in the official documentation database type DB_TYPE_INTERVAL_YM is not supported. But what is unclear is how to mitigate this limitation.

For example, when running SELECT * FROM "MYDB"."SOMETABLE" an error is thrown:

DPY-3007: database type "DB_TYPE_INTERVAL_YM" is not supported

The expected behaviour would be to replace unsupported values with some UNSUPPORTED token or just None. Otherwise it's becomes impossible to use SELECT * in case when it's potentially possible to have unsupported types.

  1. Give supporting information about tools and operating systems. Give relevant product version numbers
  • Ubuntu 22.04.1 2 x86_64 GNU/Linux
  • Python 3.11.5
  • oracledb 2.1.0

It shouldn't be too much effort to add a class specific to this since Python itself doesn't handle it. I'll consider it for 2.2.

I have added the necessary code to support INTERVAL YEAR TO MONTH as requested. If you are able to build from source you can verify that it works for you, too.

This was included in version 2.2.0 which was just released.