Error while inserting data into a table with array type columns

I am using vertica version "Vertica Analytic Database v12.0.4-11" have a table like this

CREATE TABLE public.test
id int,
LINKS array[varchar(2048), 250]

If I try to insert multiple rows in to the above table like this

insert into test values
(1, '[,]' ),
(1, '[,]')

getting an error which says

09:29:11 START Executing for: 'Vertica' [Vertica], Schema: public
09:29:11 FAILED [INSERT - 0 rows, 0.683 secs] [Code: 9988, SQL State: 22V02] [Vertica]VJDBC **ERROR: Invalid input syntax for type Varchar(80): ""

strangely although I have defined the type in the array as varchar(2048) I still see varchar(80) for the second row which is having values beyond 80 charecters error while inserting data

at the same time if I try to insert just one value lets say just the second value which is having strings beyond 80 charecters it works!!

What am I missing here?


Leave a Comment

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