Different formatting of array column in vsql and JDBC
Hi,
I just stumbled that vsql and Vertica JDBC are using different formatting for array datatypes.
$ /opt/vertica/bin/vsql -h myhost -U myuser -w mypwd -c "select array[1,2,3]"
array
[1,2,3]
(1 row)
JDBC (I am using DbVisualizer):
select ARRAY[1,2,3];
{1,2,3}
I thought that DbVisualizer tool has formatting for array datatypes - but it does not.
Vertica JDBC driver v 24.2 API docs are not mentioning anything about handling array type.
Looks like really Vertica JDBC driver return array as string in curly brackets? While vsql return in square brackets?
Thank you
Sergey
Best Answer
-
mosheg Vertica Employee Administrator
This behavior is not necessarily related to the Vertica JDBC client, as DBeaver, using the same JDBC client, displays arrays in square brackets [], while DbVisualizer uses curly brackets {} for array formatting.
1
Answers
Thanks for checking it!
It appears this behaviour is specific to client.