Can I store ARRAY column types (e.g. in Postgres) in CockroachDB?
2
votes
2 Answers
2
votes
2
votes
CockroachDB now supports the ARRAY data type since v1.1 (released Oct 2017).
You can create an array column by adding square brackets to any data type or by using the term ARRAY
CREATE TABLE names (list STRING[]);
INSERT INTO names VALUES (ARRAY['Bertram', 'Wilberforce', 'Wooster']);
SELECT * FROM names;
+-------------------------------------+
| list |
+-------------------------------------+
| {"Bertram","Wilberforce","Wooster"} |
+-------------------------------------+
(1 row)
Details can be found here in the docs: https://www.cockroachlabs.com/docs/stable/array.html