Skip to content

Commit

Permalink
Populate illegal field names for postgres connection
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Nov 30, 2022
1 parent eab3edb commit 82462b5
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/providers/postgres/qgspostgresproviderconnection.cpp
Expand Up @@ -132,6 +132,18 @@ void QgsPostgresProviderConnection::setDefaultCapabilities()
Qgis::SqlLayerDefinitionCapability::GeometryColumn,
Qgis::SqlLayerDefinitionCapability::UnstableFeatureIds,
};

// see https://www.postgresql.org/docs/current/ddl-system-columns.html
mIllegalFieldNames =
{
QStringLiteral( "tableoid" ),
QStringLiteral( "xmin" ),
QStringLiteral( "cmin" ),
QStringLiteral( "xmax" ),
QStringLiteral( "cmax" ),
QStringLiteral( "ctid" ),

};
}

void QgsPostgresProviderConnection::dropTablePrivate( const QString &schema, const QString &name ) const
Expand Down

0 comments on commit 82462b5

Please sign in to comment.