Skip to content

Using DB_TYPE_BOOLEAN in SQL on Oracle 23c. #263

@felixxm

Description

@felixxm

Docs state that DB_TYPE_BOOLEAN can be used only within PL/SQL, however it should be possible to use in SQL since Oracle 23c.

  1. What versions are you using?

Oracle 23c

platform.platform: Linux-5.15.0-89-generic-x86_64-with-glibc2.35 sys.maxsize > 2**32: True platform.python_version: 3.10.9 oracledb.__version__: 1.4.2 
  1. Is it an error or a hang or a crash?

Error

  1. What error(s) or behavior you are seeing?

The following query raises ORA-00920: invalid relational operator

SELECT NOT :arg0 FROM "SOME_TABLE" 

when :arg0 is a parameter with input_size = Database.DB_TYPE_BOOLEAN, it seems that is converted to the NUMBER.

  1. Does your application call init_oracle_client()?

No.

  1. Include a runnable Python script that shows the problem.

I can debug my issue and provide details about why and where oracledb is at fault, but first I wanted to confirm that DB_TYPE_BOOLEAN can be used within SQL and it's not something that you work on. Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions