[QGIS Commit] r15347 - trunk/qgis/src/providers/postgres
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Sat Mar 5 17:31:01 EST 2011
Author: mhugent
Date: 2011-03-05 14:31:01 -0800 (Sat, 05 Mar 2011)
New Revision: 15347
Modified:
trunk/qgis/src/providers/postgres/qgspostgresprovider.cpp
Log:
More robust detection for domain constraint
Modified: trunk/qgis/src/providers/postgres/qgspostgresprovider.cpp
===================================================================
--- trunk/qgis/src/providers/postgres/qgspostgresprovider.cpp 2011-03-05 22:09:01 UTC (rev 15346)
+++ trunk/qgis/src/providers/postgres/qgspostgresprovider.cpp 2011-03-05 22:31:01 UTC (rev 15347)
@@ -2062,8 +2062,7 @@
//(VALUE = ANY (ARRAY['a'::text, 'b'::text, 'c'::text, 'd'::text]))
//normally, postgresql creates that if the contstraint has been specified as 'VALUE in ('a', 'b', 'c', 'd')
- //todo: ANY must occure before ARRAY
- int anyPos = checkDefinition.indexOf( "VALUE=ANY" );
+ int anyPos = checkDefinition.indexOf( QRegExp( "VALUE\\s*=\\s*ANY\\s*\\(\\s*ARRAY\\s*\\[" ) );
int arrayPosition = checkDefinition.lastIndexOf( "ARRAY[" );
int closingBracketPos = checkDefinition.indexOf( "]", arrayPosition + 6 );
More information about the QGIS-commit
mailing list