Enable postgres extention intarray and add sql function