vertica icon indicating copy to clipboard operation
vertica copied to clipboard

Unknown type OID: 116

Open santosh-1987 opened this issue 4 years ago • 1 comments

Vertica raises an exception for GEOM datatype

Screenshot 2020-09-08 at 2 12 10 PM Screenshot 2020-09-08 at 2 17 16 PM

santosh-1987 avatar Sep 08 '20 08:09 santosh-1987

Pretty sure this library has never been used before with any geometry type. I don't know enough about geometry types, not do I have a testing database available to me anymore, so I don't really know, not can I figure out, what the best way to handle this type is. Happy to accept PRs though.

What needs to happen is that this type needs to be translated to a Ruby type. Types and how they are converted is defined here: https://github.com/wvanbergen/vertica/blob/master/lib/vertica/data_type.rb#L133-L146. You can add something like

Vertica::DataType.register 116, 'geom', :converter_func

Where :converted_func is the function you want to use to convert the data into a Ruby type. You can either use an existing (e.g. :binary_string) or add a new one)

wvanbergen avatar Sep 08 '20 10:09 wvanbergen