I'm using PostgreSQL 9.5. I want create an array with a fixed size, like this:
CREATE TABLE eco.test (
id text NOT NULL,
test_array integer[3],
CONSTRAINT pk_aircrafts PRIMARY KEY ( id )
);
That is, I want the size of test_array will be 3.
But, I can make this:
INSERT INTO eco.test(id, test_array) VALUES ('1', '{1,2,3,4}')
And everything will be fine.
select * from eco.test;
id | test_array
'1' {1,2,3,4}
How can I make a fixed size array?