Postgresql Exception Handling In Php