PostgreSQL Data Types and MDSPgSQL Driver - cDbUpdateFunctionLibrary


The table show how SQL data types maps to DataFlex native types and the capacity of each type.  The capacity shown is the highest possible value for the DataFlex side - or if the SQL side max value is lower - the SQL side capacity that is shown. Mostly it is the DataFlex side that has the lower capacity value.


SQL Type Name

SQL Type Constant

DataFlex Type

DataFlex Type

Constant

Capacity






bigint

ePgSQL_INT4

Numeric

DF_BCD

14.0

bit

ePgSQL_BIT

Binary

DF_BINARY

16384

boolean

ePgSQL_BOOL

ASCII

DF_ASCII

254

bytea

ePgSQL_BYTEA

Binary

DF_BINARY

16384

char

ePgSQL_CHAR

ASCII

DF_ASCII

2000

citext

ePgSQL_CITEXT

ASCII

DF_ASCII

254

date

ePgSQL_DATE

Date

DF_DATE

6.0

decimal

ePgSQL_FLOAT4

Numeric

DF_BCD

14.8

double

ePgSQL_FLOAT8

Numeric

DF_BCD

14.8

integer

ePgSQL_INT4

Numeric

DF_BCD

11.0

money

ePgSQL_MONEY

Numeric

DF_BCD

30.0

oid

ePgSQL_OID

Binary

DF_BINARY

20

real


Numeric

DF_BCD

6.6

regproc

ePgSQL_REGPROC

ASCII

DF_ASCII

64

smallint

ePgSQL_INT2

Numeric

DF_BCD

6.0

text

ePgSQL_TEXT

Text

DF_TEXT

16384

time

ePgSQL_TIME

ASCII

DF_ASCII

15.0

timestamp

ePgSQL_TIMESTAMP

DateTime

DF_DATETIME

23.0

uuid

ePgSQL_UUID

ASCII

DF_ASCII

40

varchar

ePgSQL_VARCHAR

Text

DF_TEXT

16384