Index: src/providers/postgres/qgspostgresprovider.cpp =================================================================== --- src/providers/postgres/qgspostgresprovider.cpp (revision 7085) +++ src/providers/postgres/qgspostgresprovider.cpp (working copy) @@ -479,7 +479,8 @@ } for(std::list::const_iterator it = mFetchAttributeNames.begin(); it != mFetchAttributeNames.end(); ++it) { - declare += "," + *it + "::text"; + //declare += "," + *it + "::text"; + declare += ",\"" + *it +"\""; } declare += " "; @@ -569,7 +570,7 @@ } for(namesIt = attributeNames.begin(); namesIt != attributeNames.end(); ++namesIt) { - sql += "," + *namesIt + "::text"; + sql += ",\"" + *namesIt + "\""; } sql += " " + QString("from %1").arg(mSchemaTableName);