PostgreSQL data type mappings

Data type in PostgreSQL

Data type in C# models

Data type returned by PowerServer on SyntaxFromSQL

bigint

long

decimal(0)

bigserial

long

decimal(0)

bit

bool

char

bit varying

 

char

boolean

 

char

Box

 

char

bytea

 

blob

character

string

char

character varying

string

char

cid

Uint32

char

cidr

 

char

circle

 

char

date

datetime

date

daterange

 

char

double precision

double

number

gtsvector

 

char

inet

ipaddress

char

int2vector

 

char

int4range

 

char

integer

int

long

interval

 

char

json

string

char

line

 

char

macaddr

physicaladdress

char

money

decimal

number

name

 

char

numeric(10,1)

decimal

decimal(1)

numrange

 

char

oid

 

char

path

 

char

point

 

char

polygon

 

char

real

float

real

refcursor

 

char

serial

int

long

regdictionary

 

char

smallint

short

long

smallserial

short

long

Text

string

char

tid

 

char

time with time zone(6)

datetimeoffset

char

time without time zone(6)

timespan

time

timestamp with time zone(6)

datespan

datetime

timestamp without time zone(6)

datespan

timestamp

tsquery

 

char

tsrange

 

char

uuid

guid

char

xid

 

char

xml

string

char