It's best not to use ```assert()``` unless absolutely necessary. If an assert is raised in a postgresql process, the process will bail. So complete validation and error handling is best.