Skip to content

Commit

Permalink
take DEFAULT as the postgres providers default value (instead of NULL)
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@5509 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Jun 7, 2006
1 parent 15dc800 commit 44339a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/providers/postgres/qgspostgresprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 44339a8

Please sign in to comment.