Move pg connection to dao