Renaming column. Fixing code. Improvements
Removed POSTGRESQL_DUP constant