#356 Fixed postgresql SDE patch script, thanks mbozio