ExtendManager using wrong SQL type for attributeID
Fixes for PostgreSQL bugs