<?xml version="1.0" encoding="utf-8" ?>
<ProviderManifest Namespace="Npgsql" xmlns="http://schemas.microsoft.com/ado/2006/04/edm/providermanifest">
  <Types>
    <Type Name="bool" PrimitiveTypeKind="Boolean"/>
    <Type Name="int2" PrimitiveTypeKind="Int16"/>
    <Type Name="int4" PrimitiveTypeKind="Int32"/>
    <Type Name="int8" PrimitiveTypeKind="Int64"/>
    <Type Name="numeric" PrimitiveTypeKind="Decimal">
      <FacetDescriptions>
        <!-- TODO: Need a good value for Precision and Scale -->
        <!-- Currently using DefaultValues that match money -->
        <Precision Minimum="1" Maximum="29" DefaultValue="19" Constant="false" />
        <Scale Minimum="0" Maximum="29" DefaultValue="4" Constant="false" />
      </FacetDescriptions>
    </Type>
    <Type Name="float4" PrimitiveTypeKind="Single"/>
    <Type Name="float8" PrimitiveTypeKind="Double"/>
    <Type Name="varchar" PrimitiveTypeKind="String">
      <FacetDescriptions>
        <FixedLength DefaultValue="false" Constant="true" />
        <!-- TODO: Need a good value for DefaultValue (1073741823) -->
        <MaxLength Minimum="1" Maximum="1073741823" DefaultValue="8000" Constant="false" />
        <Unicode DefaultValue="true" Constant="true" />
      </FacetDescriptions>
    </Type>
    <Type Name="text" PrimitiveTypeKind="String">
      <FacetDescriptions>
        <FixedLength DefaultValue="false" Constant="true" />
        <!-- TODO: Need a good value for MaxLength -->
        <MaxLength DefaultValue="1073741823" Constant="true" />
        <Unicode DefaultValue="true" Constant="true" />
      </FacetDescriptions>
    </Type>
    <Type Name="xml" PrimitiveTypeKind="String">
      <FacetDescriptions>
        <FixedLength DefaultValue="false" Constant="true" />
        <!-- TODO: Need a good value for MaxLength -->
        <MaxLength DefaultValue="1073741823" Constant="true" />
        <Unicode DefaultValue="true" Constant="true" />
      </FacetDescriptions>
    </Type>
    <Type Name="bpchar" PrimitiveTypeKind="String">
      <FacetDescriptions>
        <FixedLength DefaultValue="true" Constant="true" />
        <!-- TODO: Need a good value for DefaultValue -->
        <MaxLength Minimum="1" Maximum="1073741823" DefaultValue="1" Constant="false" />
        <Unicode DefaultValue="true" Constant="true" />
      </FacetDescriptions>
    </Type>
    <Type Name="timestamp" PrimitiveTypeKind="DateTime">
      <FacetDescriptions>
        <Precision DefaultValue="6" Constant="true"/>
      </FacetDescriptions>
    </Type>
    <Type Name="rowversion" PrimitiveTypeKind="Binary">
      <FacetDescriptions>
        <MaxLength DefaultValue="8" Constant="true" />
        <FixedLength DefaultValue="true" Constant="true" />
      </FacetDescriptions>
    </Type>
    <Type Name="date" PrimitiveTypeKind="DateTime">
      <FacetDescriptions>
        <Precision DefaultValue="0" Constant="true"/>
      </FacetDescriptions>
    </Type>
    <Type Name="interval" PrimitiveTypeKind="Time">
      <FacetDescriptions>
        <Precision Minimum="0" Maximum="6" DefaultValue="6" Constant="false"/>
      </FacetDescriptions>
    </Type>
    <Type Name="time" PrimitiveTypeKind="Time">
      <FacetDescriptions>
        <Precision Minimum="0" Maximum="6" DefaultValue="6" Constant="false"/>
      </FacetDescriptions>
    </Type>
    <Type Name="timestamptz" PrimitiveTypeKind="DateTimeOffset">
      <FacetDescriptions>
        <Precision Minimum="0" Maximum="10" DefaultValue="7" Constant="false"/>
      </FacetDescriptions>
    </Type>
    <Type Name="bytea" PrimitiveTypeKind="Binary">
      <FacetDescriptions>
        <FixedLength DefaultValue="false" Constant="true" />
        <MaxLength DefaultValue="2147483647" Constant="true" />
      </FacetDescriptions>
    </Type>
    <Type Name="uuid" PrimitiveTypeKind="Guid"/>
  </Types>
  <Functions>
    <Function Name="COUNT" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Int64" />
      <Parameter Name="arg" Type="Collection(Boolean)" Mode="In" />
    </Function>
    <Function Name="COUNT" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Int64" />
      <Parameter Name="arg" Type="Collection(Double)" Mode="In" />
    </Function>
    <Function Name="COUNT" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Int64" />
      <Parameter Name="arg" Type="Collection(DateTime)" Mode="In" />
    </Function>
    <Function Name="COUNT" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Int64" />
      <Parameter Name="arg" Type="Collection(Guid)" Mode="In" />
    </Function>
    <Function Name="COUNT" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Int64" />
      <Parameter Name="arg" Type="Collection(String)" Mode="In" />
    </Function>
    <Function Name="COUNT" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Int64" />
      <Parameter Name="arg" Type="Collection(Binary)" Mode="In" />
    </Function>
  </Functions>
</ProviderManifest>