@@ -503,6 +503,7 @@ bool QgsPostgresConn::getTableInfo( bool searchGeometryColumnsOnly, bool searchP
503
503
int dim = result.PQgetvalue ( idx, 5 ).toInt ();
504
504
QString relkind = result.PQgetvalue ( idx, 6 );
505
505
bool isView = relkind == QLatin1String ( " v" ) || relkind == QLatin1String ( " m" );
506
+ bool isMaterializedView = relkind == QLatin1String ( " m" );
506
507
QString comment = result.PQgetvalue ( idx, 7 );
507
508
508
509
int srid = ssrid.isEmpty () ? INT_MIN : ssrid.toInt ();
@@ -535,6 +536,7 @@ bool QgsPostgresConn::getTableInfo( bool searchGeometryColumnsOnly, bool searchP
535
536
layerProperty.sql .clear ();
536
537
layerProperty.relKind = relkind;
537
538
layerProperty.isView = isView;
539
+ layerProperty.isMaterializedView = isMaterializedView;
538
540
layerProperty.tableComment = comment;
539
541
addColumnInfo ( layerProperty, schemaName, tableName, isView );
540
542
@@ -623,6 +625,7 @@ bool QgsPostgresConn::getTableInfo( bool searchGeometryColumnsOnly, bool searchP
623
625
QString relkind = result.PQgetvalue ( i, 3 ); // relation kind
624
626
QString coltype = result.PQgetvalue ( i, 4 ); // column type
625
627
bool isView = relkind == QLatin1String ( " v" ) || relkind == QLatin1String ( " m" );
628
+ bool isMaterializedView = relkind == QLatin1String ( " m" );
626
629
QString comment = result.PQgetvalue ( i, 5 ); // table comment
627
630
628
631
// QgsDebugMsg( QString( "%1.%2.%3: %4" ).arg( schemaName ).arg( tableName ).arg( column ).arg( relkind ) );
@@ -634,6 +637,7 @@ bool QgsPostgresConn::getTableInfo( bool searchGeometryColumnsOnly, bool searchP
634
637
layerProperty.geometryColName = column;
635
638
layerProperty.relKind = relkind;
636
639
layerProperty.isView = isView;
640
+ layerProperty.isMaterializedView = isMaterializedView;
637
641
layerProperty.tableComment = comment;
638
642
if ( coltype == QLatin1String ( " geometry" ) )
639
643
{
@@ -710,6 +714,7 @@ bool QgsPostgresConn::getTableInfo( bool searchGeometryColumnsOnly, bool searchP
710
714
QString schema = result.PQgetvalue ( i, 1 ); // nspname
711
715
QString relkind = result.PQgetvalue ( i, 2 ); // relation kind
712
716
bool isView = relkind == QLatin1String ( " v" ) || relkind == QLatin1String ( " m" );
717
+ bool isMaterializedView = relkind == QLatin1String ( " m" );
713
718
QString comment = result.PQgetvalue ( i, 3 ); // table comment
714
719
715
720
// QgsDebugMsg( QString( "%1.%2: %3" ).arg( schema ).arg( table ).arg( relkind ) );
@@ -722,6 +727,7 @@ bool QgsPostgresConn::getTableInfo( bool searchGeometryColumnsOnly, bool searchP
722
727
layerProperty.geometryColType = SctNone;
723
728
layerProperty.relKind = relkind;
724
729
layerProperty.isView = isView;
730
+ layerProperty.isMaterializedView = isMaterializedView;
725
731
layerProperty.tableComment = comment;
726
732
727
733
// check if we've already added this layer in some form
0 commit comments