1006693: Fixing PG error on definition destroy