merge psql ef/ev sf/sv handling functions

merge psql ef/ev sf/sv handling functions

Edit