1006693: Fixing PG error on definition destroy
Merge pull request #2973 from daviddavis/temp/20130917122354

1006693: Fixing PG error on definition destroy