Skip to content

column_info: unreachable elsif means CHOOSE hint deprecation fix (rt91217) never applies #206

@djzort

Description

@djzort

In column_info(), the version check logic has an unreachable branch:

if ($ora_server_version->[0] >= 8) {
    # set $typecase for TIMESTAMP types
} elsif ($ora_server_version->[0] >= 11) {
    # rt91217 CHOOSE hint deprecated
    $choose = '\;
}

Any Oracle version >= 11 already satisfies >= 8, so the elsif block that clears the deprecated CHOOSE hint is never executed. The fix for rt91217 is effectively dead code.

Fix: Restructure so that both conditions can take effect independently:

if ($ora_server_version->[0] >= 8) {
    $typecase = <<'SQL';
    ...
SQL
    $typecaseend = 'END';
}
if ($ora_server_version->[0] >= 11) {
    $choose = '\;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions