Skip to content

Commit e6f5236

Browse files
committedOct 21, 2017
postgres provider: queries have an unknown relation type
1 parent 6428fed commit e6f5236

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed
 

‎src/providers/postgres/qgspostgresprovider.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4290,6 +4290,9 @@ QgsAttrPalIndexNameHash QgsPostgresProvider::palAttributeIndexNames() const
42904290

42914291
QgsPostgresProvider::Relkind QgsPostgresProvider::relkind() const
42924292
{
4293+
if ( mIsQuery )
4294+
return Relkind::Unknown;
4295+
42934296
QString sql = QStringLiteral( "SELECT relkind FROM pg_class WHERE oid=regclass(%1)::oid" ).arg( quotedValue( mQuery ) );
42944297
QgsPostgresResult res( connectionRO()->PQexec( sql ) );
42954298
QString type = res.PQgetvalue( 0, 0 );

0 commit comments

Comments
 (0)
Please sign in to comment.