Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
postgresql provider: also quote schema when creating project table (f…
…ixes #19394)

(cherry picked from commit 87bce6a)
  • Loading branch information
jef-n committed Jul 11, 2018
1 parent 61a7f72 commit 4895cab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/providers/postgres/qgspostgresprojectstorage.cpp
Expand Up @@ -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 )
{
Expand Down

0 comments on commit 4895cab

Please sign in to comment.