modify to postgresql