Skip to content
Permalink
Browse files

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 4895cab4429c9e675b2d9af05285a559989bb1df
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 4895cab

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