As reported in [1], pg_attribute.attndims turns to 0 when 'create table like/as'.The patch attached is to fix it.
Best Regards, Alexey
[1] https://www.postgresql.org/message-id/20150707072942.1186.98151%40wrigleys.postgresql.org