Data Types
Table 5 through Table 8 list the data types supported by the PSQL ADO.NET Data Provider.
Table 5 maps the PSQL data types to the .NET Framework types.
Table 6 maps the data types the data provider uses if only the System.Data.DbType is specified.
Table 7 maps the data types the data provider uses to infer a data type if neither the provider-specific type nor the System.Data.DbType are provided.
Table 8 maps the data types the data provider uses when streams are used as inputs to Long data parameters.
Mapping PSQL Data Types to .NET Framework Data Types
Table 5 lists the data types supported by the ADO.NET data provider and how they are mapped to the .NET Framework types. You can use the table to infer the data types that will be used when a DataSet is filled using a DataAdapter.
This table also identifies the proper accessors for accessing the data when a DataReader object is used directly.
 
Mapping Parameter Data Types
The type of the parameter is specific to each data provider. The ADO.NET data provider must convert the parameter value to a native format before sending it to the server. The best way for an application to describe a parameter is to use the data provider-specific type enumeration.
In generic programming circumstances, the data provider-specific type may not be available. When no provider-specific DB type has been specified, the data type will be inferred from either the System.Data.DbType or from the .NET Framework type of the parameter’s value.
The ADO.NET data provider uses the following order when inferring the data type of a parameter:
Table 6 shows how the data provider infers its types if only the System.Data.DbType is specified.
 
Table 7 shows the mapping that the data provider uses to infer a data type if neither the provider-specific data type nor the System.Data.DbType are provided.
 
Data Types Supported With Stream Objects
The ADO.NET data provider supports the use of streams as inputs to long data parameters with the data types listed in Table 8.
 
See Using Streams as Input to Long Data Parameters for a discussion of using streams.