Skip to content

Commit f84685c

Browse files
author
jef
committed
fix #1897
git-svn-id: http://svn.osgeo.org/qgis/trunk@11514 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent c7019aa commit f84685c

File tree

3 files changed

+1
-5
lines changed

3 files changed

+1
-5
lines changed

src/app/qgsnewconnection.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
* *
1616
***************************************************************************/
1717
/* $Id$ */
18-
#include <iostream>
1918

2019
#include <QSettings>
2120
#include <QMessageBox>
@@ -132,8 +131,6 @@ void QgsNewConnection::testConnection()
132131
}
133132
// free pg connection resources
134133
PQfinish( pd );
135-
136-
137134
}
138135

139136
void QgsNewConnection::saveConnection()

src/plugins/spit/qgsspit.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ void QgsSpit::dbConnect()
467467
}
468468
}
469469

470-
QString schemaSql = QString( "select nspname from pg_namespace,pg_user where nspowner=usesysid and usename=%1" )
470+
QString schemaSql = QString( "select nspname from pg_namespace where has_schema_privilege(nspname, 'CREATE')" )
471471
.arg( QgsPgUtil::quotedValue( username ) );
472472
PGresult *schemas = PQexec( conn, schemaSql.toUtf8() );
473473
// get the schema names

src/plugins/spit/qgsspitplugin.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
/* $Id$ */
2020

2121
// includes
22-
#include <iostream>
2322
#include <vector>
2423

2524
#include <QAction>

0 commit comments

Comments
 (0)