Retrieving Schema Metadata with the GetSchema Method
Applications use the GetSchema method of the Connection object to retrieve Schema Metadata about a data provider and/or data source. Each provider implements a number of Schema collections, including the five standard metadata collections.
Additional collections are specified and must be supported to return Schema information from the data provider.
See Additional Schema Collections for details about the other collections supported by the data providers.
NOTE: Refer to the .NET Framework documentation for additional background functional requirements, including the required data type for each ColumnName.
MetaDataCollections Schema Collections
The MetaDataCollections schema collection is a list of the schema collections available to the logged in user. The MetaDataCollection can return the supported columns described in Table 50 in any order.
 
DataSourceInformation Schema Collection
The DataSourceInformation schema collection can return the supported columns, described in Table 51, in any order. Note that only one row is returned.
 
DataTypes Collection
Table 52 describes the supported columns of the DataTypes schema collection. The columns can be returned in any order.
 
Otherwise, this is DBNull.Value.
Otherwise, this is DBNull.Value.
ReservedWords Collection
This schema collection exposes information about the words that are reserved by the database to which the data provider is connected. Table 53 describes the columns that the data provider supports.
 
Restrictions Collection
The Restrictions schema collection exposes information about the restrictions supported by the data provider that is currently connected to the database. Table 54 describes the columns returned by the data providers. The columns can be returned in any order.
The PSQL ADO.NET Data Provider uses standardized names for restrictions. If the data provider supports a restriction for a Schema method, it always uses the same name for the restriction.
The case sensitivity of any restriction value is determined by the underlying database, and can be determined by the IdentifierCase and QuotedIdentifierCase values in the DataSourceInformation collection (see DataSourceInformation Schema Collection).
 
See Additional Schema Collections for the restrictions that apply to the each of the additional supported schema collections.