Adding local psql functionality