Updated on 2024-11-11 GMT+08:00

Data Type Compatibility

Table 1 Other PL/SQL data types

No.

Oracle Database

GaussDB

Difference

1

CHARACTER

Supported, with differences.

  • GaussDB: The length ranges from 1 to 10485760 bytes.
  • Oracle Database: The length ranges from 1 to 32767 bytes.

2

VARCHAR

Supported, with differences.

  • GaussDB: The length ranges from 1 to 10485760 bytes.
  • Oracle Database: The length ranges from 1 to 32767 bytes.

3

STRING

Not supported.

-

4

PLS_INTEGER

Not supported.

In GaussDB, you can use the INT type.

5

BINARY_INTEGER

Supported.

-

Table 2 User-defined PL/SQL subtypes

No.

Oracle Database

GaussDB

Difference

1

SUBTYPE subtype_name IS base_type

Supported.

-

2

SUBTYPE subtype_name IS base_type

{ precision [, scale ] | RANGE low_value .. high_value } [ NOT NULL ]

Supported, with differences.

  • In GaussDB, only the INT type supports the RANGE constraint. In Oracle Database, only PLS_INTEGER, BINARY_INTEGER, and their predefined subtypes support the RANGE constraint.
  • In GaussDB, the RANGE constraint cannot be specified when variables are defined.
  • In GaussDB, the character set information cannot be specified when the base type of subtype is the character data type.

3

SUBTYPE subtype_name IS base_type [ NOT NULL ]

Supported.

-