--- qgis-1.6.0/src/providers/postgres/qgspostgresprovider.cpp 2010-10-14 10:42:55.000000000 -0500 +++ qgis-trunk/src/providers/postgres/qgspostgresprovider2.cpp 2011-06-12 23:18:32.000000000 -0500 @@ -372,7 +372,7 @@ } else if ( type == "geometry" ) { - return QString( "asewkt(%1)" ).arg( quotedIdentifier( fld.name() ) ); + return QString( "st_asewkt(%1)" ).arg( quotedIdentifier( fld.name() ) ); } else if ( type == "geography" ) {