【发布时间】:2019-04-10 09:10:59
【问题描述】:
我正在尝试在 Greenplum 中创建一个复合类型并使用该类型的数组。但是当我尝试向表中插入数据时,它总是说
列“foo”的类型为 test11.test_type[],但表达式的类型为 record[]。
提示:您将需要重写或强制转换表达式。 SQL 状态:42804"。
我已经尝试了将数组插入greenplum的所有方法。例如。 array[(3,4),(2,4)] and '{(1,3), (1,2)}'
create type test11.test123 as (a1 int, a2 int);
create table test11.test(faa qlake_streaming_ioc.test11[], aa int);
insert into test(faa, aa) values (array[(3,4),(2,4)] , 3);
【问题讨论】:
-
我不知道 greenplum,但在 Postgres 中你会使用
array[(3,4),(2,4)]::test123[] -
感谢工作。
标签: greenplum