Trying to implement postgresql