[postgresql] fixed extraction of exit status