Postgresql Create New Table From Select Query With Array