Skip to content
Permalink
Browse files
take DEFAULT as the postgres providers default value (instead of NULL)
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5509 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Jun 7, 2006
1 parent 456c27a commit 4aead68e0ac0c7ac60df5fb61318e52f4762d2d4
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/providers/postgres/qgspostgresprovider.cpp
@@ -1592,7 +1592,7 @@ bool QgsPostgresProvider::addFeature(QgsFeature* f, int primaryKeyHighWater)
#endif

//add quotes if the field is a character or date type
if(fieldvalue!="NULL")
if(fieldvalue != "NULL" && fieldvalue != "DEFAULT")
{
for(std::vector<QgsField>::iterator iter=attributeFields.begin();iter!=attributeFields.end();++iter)
{
@@ -1660,7 +1660,7 @@ bool QgsPostgresProvider::addFeature(QgsFeature* f, int primaryKeyHighWater)

QString QgsPostgresProvider::getDefaultValue(const QString& attr, QgsFeature* f)
{
return "NULL";
return "DEFAULT";
}

bool QgsPostgresProvider::deleteFeature(int id)

0 comments on commit 4aead68

Please sign in to comment.