1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
| /*************************
THIS WORKS OK
*************************/
create table test_string_array (
a int primary key,
b varchar(10)[]
);
insert into test_string_array values (1,'{"(1.0,2.0)","(3.1,4.2)"}');
select * from test_string_array
/*************************
THIS DOES NOT WORKS
*************************/
CREATE TYPE string_array AS (val varchar(10)[]) ;
create table test_string_array_1 (
a int primary key,
b string_array
);
insert into test_string_array_1 values (1,'{"(1.0,2.0)","(3.1,4.2)"}');
ERREUR: enregistrement litéral invalide : « {"(1.0,2.0)","(3.1,4.2)"} »
LINE 1: insert into test_string_array_1 values (1,'{"(1.0,2.0)","(3....
^
DETAIL: Parenthèse gauche manquante |
Partager