Skip to content
Permalink
Browse files

postgresql provider: also quote schema when creating project table (f…

…ixes #19394)
  • Loading branch information
jef-n committed Jul 11, 2018
1 parent 1875b02 commit 87bce6ad7e19789d248dc20cab47d5d974197040
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/providers/postgres/qgspostgresprojectstorage.cpp
@@ -158,7 +158,7 @@ bool QgsPostgresProjectStorage::writeProject( const QString &uri, QIODevice *dev
if ( !_projectsTableExists( *conn, projectUri.schemaName ) )
{
// try to create projects table
QString sql = QStringLiteral( "CREATE TABLE %1.qgis_projects(name TEXT PRIMARY KEY, metadata JSONB, content BYTEA)" ).arg( projectUri.schemaName );
QString sql = QStringLiteral( "CREATE TABLE %1.qgis_projects(name TEXT PRIMARY KEY, metadata JSONB, content BYTEA)" ).arg( QgsPostgresConn::quotedIdentifier( projectUri.schemaName ) );
QgsPostgresResult res( conn->PQexec( sql ) );
if ( res.PQresultStatus() != PGRES_COMMAND_OK )
{

0 comments on commit 87bce6a

Please sign in to comment.
You can’t perform that action at this time.