Move this above the ```elog(ERROR, ...)```. When ```elog()``` is called with ```ERROR```, no code after the ```elog()``` will run. This is because PostgreSQL long-jump's out of the process.

For ```elog(NOTICE, ...)``` and most other status flags, the process continues.