Neil Conway <neilc@samurai.com> writes:
> I fixed this by adding the appropriate ldap_unbind() calls in error
> control paths. An alternative would be to have a single place do the
> error handling, and jump to that via goto.
Perhaps use a PG_TRY construct?
regards, tom lane