Fixed size array in PostgreSQL 9.5
<p>I'm using PostgreSQL 9.5.
I want create an array with a fixed size, like this:</p>

<pre><code>CREATE TABLE eco.test ( 
    id           text  NOT NULL,
    test_array   integer[3],
    CONSTRAINT pk_aircrafts PRIMARY KEY ( id )
 );
</code></pre>

<p>That is, I want the size of test_array will be 3.</p>

<p>But, I can make this:</p>

<pre><code>INSERT INTO eco.test(id, test_array) VALUES ('1', '{1,2,3,4}')
</code></pre>

<p>And everything will be fine.</p>

<pre><code>select * from eco.test;
id | test_array
'1'   {1,2,3,4}
</code></pre>

<p>How can I make a fixed size array?</p>