Updated on 2023-03-30 GMT+08:00

Data Types Supported by TSFIELD

The TSFIELD time series table supports the following data types.

Table 1 Supported data types

Type

Data Type

Description

Supported or Not (Y/N)

Length

Value

Numeric Types

SMALLINT

A small integer.

Y

2 bytes

-32,768 ~ +32,767

INTEGER

Common integers.

Y

4 bytes

-2,147,483,648 ~ +2,147,483,647

BIGINT

A large integer.

Y

8 bytes

-9,223,372,036,854,775,808 ~ 9,223,372,036,854,775,807

NUMERIC[(p[,s])],

DECIMAL[(p[,s])]

The value range of p (precision) is [1,1000], and the value range of s (standard) is [0,p].

Y

Variable length

Up to 131,072 digits before the decimal point; and up to 16,383 digits after the decimal point when no precision is specified

REAL

Single precision floating points, inexact

Y

4 bytes

Six bytes of decimal digits

DOUBLE PRECISION

Double precision floating points, inexact

Y

8 bytes

1E-307~1E+308,

15 bytes of decimal digits

SMALLSERIAL

Two-byte auto-incrementing integer

Y

2 bytes

1 ~ 32,767

SERIAL

Four-byte auto-incrementing integer

Y

4 bytes

1 ~ 2,147,483,647

BIGSERIAL

Eight-byte auto-incrementing integer

Y

8 bytes

1 ~ 9,223,372,036,854,775,807

Monetary Types

MONEY

Currency amount

Y

8 bytes

-92233720368547758.08 ~ +92233720368547758.07

Character Types

VARCHAR(n)

CHARACTER VARYING(n)

Variable-length string.

Y

n indicates the byte length. The value of n is less than 10485761.

The maximum size is 10 MB.

CHAR(n)

CHARACTER(n)

Fixed-length character string. If the length is not reached, fill in spaces.

Y

n indicates the string length. If it is not specified, the default precision 1 is used. The value of n is less than 10485761.

The maximum size is 10 MB.

CHARACTER

CHAR

Single-byte internal type

Y

1 byte

-

TEXT

Variable-length string.

Y

Variable length

The maximum size is 1,073,733,621 bytes (1 GB - 8023 bytes).

NVARCHAR2(n)

Variable-length string.

Y

Variable length

The maximum size is 10 MB.

NAME

Internal type for object names

N

64 bytes

-

Date/Time Types

TIMESTAMP[(p)][WITH TIME ZONE]

Specifies the date and time (with time zone). p indicates the precision after the decimal point. The value ranges from 0 to 6.

Y

8 bytes

-

TIMESTAMP[(p)] [WITHOUT TIME ZONE]

Specifies the date and time.

p indicates the precision after the decimal point. The value ranges from 0 to 6.

Y

8 bytes

-

DATE

In Oracle compatibility mode, it is equivalent to timestamp(0) and records the date and time.

In other modes, it records the date.

Y

In Oracle compatibility mode, it occupies 8 bytes.

In Oracle compatibility mode, it occupies 4 bytes.

-

TIME [(p)] [WITHOUT TIME ZONE]

Specifies time within one day.

p indicates the precision after the decimal point. The value ranges from 0 to 6.

Y

8 bytes

-

TIME [(p)] [WITH TIME ZONE]

Specifies time within one day (with time zone).

p indicates the precision after the decimal point. The value ranges from 0 to 6.

Y

12 bytes

-

INTERVAL

Specifies the time interval.

Y

16 bytes

-

big object

CLOB

Variable-length string. A big text object.

Y

Variable length

The maximum size is 1,073,733,621 bytes (1 GB - 8023 bytes).

BLOB

Binary large object.

N

Variable length

The maximum size is 10,7373,3621 bytes (1 GB - 8023 bytes).

other types

N