List of **typeOID** values for each column type?
Is there a definitive list of typeOID values for each column type?
After upgrading to Vertica 12 I found that date fields are returning typeOID value 1082
rather than typeOID 10
.
This breaks projects using the older Node.js library https://github.com/wvanbergen/node-vertica
I haven't tested it yet but I don't see type 1082 (date) or even 1043 (string) in the newer official Vertica Node.js library (https://github.com/vertica/vertica-python/blob/master/vertica_python/datatypes.py)
I'd like to revise that adding this data type and wonder if there are other new data types in Vertica 12?
The C++ docs I can find show that typeOID is an attribute but I can't find its set of allowed values (https://www.vertica.com/docs/9.3.x/HTML/CppSDK/functions_0x74.htm)
https://github.com/wvanbergen/node-vertica/blob/master/src/types.coffee
exports.typeOIDs = 4: "string" 5: "boolean" 6: "integer" 7: "real" 8: "string" 9: "string" 10: "date" 11: "time" 12: "timestamp" 13: "timestamp" 14: "interval" 15: "time" 16: "numeric" 25: "string" 1043: "string" 20: "integer" 21: "integer" 23: "integer" 26: "integer" 700: "integer" 701: "integer" 1700: "real"
Answers
Have a look at the following file in your Vertica installation: /opt/vertica/sdk/include/Oids.h
@Bryan_H Thanks! This is really helpful.
Can I ask for a little help interpreting this? There are comments but to me they seem backward. For instance it now says DateOID is
10
and// was 1082
but in my experience it was 10 before (i.e. Vertica 9 ,10, 11) and is currently returning1082
now (Vertica 12)x