Skip to content

Commit 4aead68

Browse files
author
mhugent
committed
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
1 parent 456c27a commit 4aead68

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/providers/postgres/qgspostgresprovider.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1592,7 +1592,7 @@ bool QgsPostgresProvider::addFeature(QgsFeature* f, int primaryKeyHighWater)
15921592
#endif
15931593

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

16611661
QString QgsPostgresProvider::getDefaultValue(const QString& attr, QgsFeature* f)
16621662
{
1663-
return "NULL";
1663+
return "DEFAULT";
16641664
}
16651665

16661666
bool QgsPostgresProvider::deleteFeature(int id)

0 commit comments

Comments
 (0)