Accessing System tables using ODBC and binding C types

I would like to access tables in Vertica such as the disk_storage table using the ODBC interface.  The user level DB's are detailed in the v_catalog.columns however I cannot seem to see any detailed about the v_catalog tables, possibly due to their being virtual.

So the questions is if I want to use ODBC and do a bind of C data types to the statement results how do I determine what the column data types will be in the disk_storage table for example ?
            std::string statement("SELECT * FROM disk_storage WHERE storage_usage ILIKE '%data%' ORDER BY rank;");
...
             ret = SQLExecDirect( hdlStmt, (SQLCHAR*)statement.c_str(), SQL_NTS );

             ret = SQLBindCol(hdlStmt, 1, SQL_C_???????, ....;

What is the secret way to determine what  SQL_C_???????,would be for the system tables?

Thanks,
Karl

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file