我在Postgresql和C#之间搜索类型转换表,但我找不到任何东西。
如果我有时间,我将研究上表的空单元格。
但如果你知道网页有这些信息,我非常适合你的帮助。
如果我有时间,我将研究上表的空单元格。
但如果你知道网页有这些信息,我非常适合你的帮助。
- Postgre Type --->C# Type
- bigint --->Int64
- bigserial --->
- bit [ (n) ] --->Byte[]
- bit varying [ (n) ] --->Byte
- boolean --->Boolean
- Box --->
- bytea --->Byte[]
- character varying [ (n) ] ---> String
- character --->String
- cidr
- circle
- date --->DateTime
- double precision --->Double
- inet
- integer --->Int32
- interval [ (p) ] --->TimeSpan
- line
- lseg
- macaddr
- money
- numeric [ (p,s) ] --->Decimal
- decimal [ (p,s) ] --->Decimal
- path
- point
- polygon
- real --->Single
- smallint --->Int16
- serial
- text --->String
- time [ (p) ] [ without time zone ] --->
- time [ (p) ] with time zone --->
- timestamp [ (p) ] [ without time zone ] --->
- timestamp [ (p) ] with time zone --->
- tsquery
- tsvector
- txid_snapshot
- uuid --->Guid
- xml
也许你可以找到通过文档查找的东西
Npgsql,它是一个用于Postgresql的.NET数据提供程序的实现。
Npgsql,它是一个用于Postgresql的.NET数据提供程序的实现。
This page of the documentation实际上包含一个完整的表,你正在寻找什么。搜索“4.当前Npgsql状态” – “支持的数据类型”。有一个很好的表与所有Postgresql数据类型和他们的通讯员在.NET。
- Postgresql NpgsqlDbType System.DbType Enum .Net System Type
- ---------- ------------ ------------------ ----------------
- int8 Bigint Int64 Int64
- bool Boolean Boolean Boolean
- bytea Bytea Binary Byte[]
- date Date Date DateTime
- float8 Double Double Double
- int4 Integer Int32 Int32
- money Money Decimal Decimal
- numeric Numeric Decimal Decimal
- float4 Real Single Single
- int2 Smallint Int16 Int16
- text Text String String
- time Time Time DateTime
- timetz Time Time DateTime
- timestamp Timestamp DateTime DateTime
- timestamptz TimestampTZ DateTime DateTime
- interval Interval Object TimeSpan
- varchar Varchar String String
- inet Inet Object IPAddress
- bit Bit Boolean Boolean
- uuid Uuid Guid Guid
- array Array Object Array