SQL Types

The information below indicates bit.io's support of PostgreSQL data types. If you would like to see a currently unsupported data type on bit.io, you can send a feature request to [email protected]

Integer & Float Types

Numeric types in PostgreSQL include integers, floating-point numbers, and decimals.

Name

Supported

Size

Description

Range

smallint

2 bytes

small-range integer

-32768 to +32767

integer

4 bytes

standard integer

-2147483648 to +2147483647

bigint

8 bytes

long range integer

-9223372036854775808 to +9223372036854775807

decimal

variable

user defined precision number

up to 131072 digits to the left of the decimal point and 16383 digits to the right of the decimal point

numeric

variable

user defined precision number

up to 131072 digits to the left of the decimal point and 16383 digits to the right of the decimal point

real

4 bytes

floating-point numeric

6 decimal digits of precision (around 1E-37 to 1E+37)

double precision

8 bytes

floating-point numeric

15 decimal digits of precision (around 1E-307 to 1E+308)

smallserial

2 bytes

small auto-incrementing integer

1 to 32767

serial

4 bytes

standard auto-incrementing integer

1 to 2147483647

bigserial

8 bytes

large auto-incrementing integer

1 to 9223372036854775807

For more information about numeric types, reference the PostgreSQL documentation.

Character Types

Character types in PostgreSQL include fixed and variable length strings.

Name

Supported

Description

character varying(n) or varchar(n)

variable length string of characters with limit

character(n) or char(n)

fixed length string of characters

text

variable length string with unlimited length

For more information about character types, reference the PostgreSQL documentation.

Binary Data Types

Binary data types in PostgreSQL include binary strings.

Type

Supported

Size

Description

bytea

1 or 4 bytes + length of binary string

binary string

For more information about binary types, reference the PostgreSQL documentation.

Date and Time Types

Date/Time types in PostgreSQL include the following:

Type

Supported

Size

Description

timestamp [ (p) ] [without time zone]

8 bytes

date and time without a time zone

timestamp [ (p) ] with time zone

8 bytes

date and time with time zone

date

4 bytes

date without time

time [ (p) ] [ without time zone ]

8 bytes

time of day without time zone

time [ (p) ] with time zone

8 bytes

time of day with time zone

interval [ fields ] [ (p) ]

8 bytes

time interval

For more information about date/time types, reference the PostgreSQL documentation.

Boolean Types

Type

Supported

Size

Description

bool

1 byte

true or false value

For more information about boolean types, reference the PostgreSQL documentation.

Bit String Types

We do not currently support bit string types. Bit string types in PostgreSQL include the following:

Type

Supported

Size

Description

bit(n)

n bits

fixed length sequence of bits

bit varying(n)

n bits

variable length sequence of bits

For more information about bit string types, reference the PostgreSQL documentation.

JSON Types

JSON types in PostgreSQL include the following:

Type

Supported

Description

json

JSON (JavaScript Object Notation) data, stored as a copy of the input text

jsonb

JSON data, stored in binary format

For more information about binary types, reference the PostgreSQL documentation.


Did this page help you?