I made two dimensional array as timestamp type. Then i added an insert like this
'{{2017-03-01 14:00:00},{2017-06-01 21:00:00}}'
How can I get only second element?
Creating of table:
create table client(id SERIAL PRIMARY KEY, full_name VARCHAR(40) NOT NULL, gender VARCHAR(15) NOT NULL, phone_number VARCHAR(20) NOT NULL, card_type VARCHAR(30) NOT NULL, card_period Timestamp[][] NOT NULL );
Then I made some inserts as next:
insert into client (full_name, phone_number, card_type, card_period, gender) values('Mr James Abrams','3805832940003073','Bronze','{{2017-03-01 14:00:00},{2017-06-01 21:00:00}}','man');
When for example I select something
select card_period from client where id = 1;
Its shows like: 2017-03-01T14:00:00,2017-06-01T21:00:00 I tried to select card_period[0:1] - shows only first, if [0:2] then it shows them both