Skip to content

dbExistsTable() throws error for DB2 temporary tables in version 1.6.0 #905

@nattomi

Description

@nattomi
dbExistsTable(conn, Id(schema = "SESSION", table = "MY_TEMP"))

throws

Error in `$<-.data.frame`(`*tmp*`, table_remarks, value = NA_character_) : 
  replacement has 1 row, data has 0
Calls: print ... tryCatchList -> tryCatchOne -> doTryCatch -> $<- -> $<-.data.frame`

in version 1.6.0 when applied to DB2 global temporary tables (SESSION.* tables).

In version 1.5.0 dbExistsTable returns FALSE in the same scenario.

Please refer to https://github.com/nattomi/odbc-dbexiststable-issue for a reproducible example.

Whether dbExistsTable should theoretically return FALSE or TRUE is not quite clear, because temporary tables are also not visible in the system catalog (syscat,tables). However, it should definitely not throw.

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