Skip to main content

KlustronAbout 2 min

Klustron supports most PostgreSQL DDL SQL syntax and almost all DML SQL syntax, except the function points listed below. For the SQL syntax and function usage supported by Klustron, you can refer to PostgreSQL documentationopen in new window

1. Unsupported features

  1. foreign key

  2. table inheritance

  3. User-defined types (except enum) and their inheritance

  4. XML data management

  5. Object database related functions

  6. Array types and Range types

  7. Data streaming replication, including WAL-based physical replication and logical replication

  8. Storage-Related Options for Data Tables and Indexes

    • All 'storage params' (storage parameters) for the create table statement, as well as tablespace settings. These options are ignored and a warning message is returned to the client.
    • excludeConstraints: ignore and return warnings
    • indexed includefields
    • 'create table select from'sentence
    • Storage management operations for data tables, including cluster, vacuum, reindex, etc.
    • System columns (OID, CTID, etc.)

    These operations cannot be performed on user data tables, but can be performed on metadata tables stored locally on computing nodes.

  9. create index advanced features

    Klustron does not support these indexing options and features:

    • expression as an index field
    • partial index(ignore certain data rows without inserting index rows for them)
    • CONCURRENTOption: ignore
    • includeclause: ignore
    • 'COLLATE'clauses: forbidden,
    • 'nulls first' / 'nulls last' :If specified, it is automatically ignored, and MySQL's default method is always used, which is just the opposite of PostgreSQL's default method.
    • opclass:prohibit
    • hashIndex type: Since MySQL does not support hash index, it will be automatically ignored even if it is specified, and the index still uses b+tree
    • rtreeIndex type: not supported
    • 'exclude'clause: not supported
  10. create / alter databaseStorage related options for

  11. ALTER TABLEunsupported features

    Klustron automatically ignores these options:

    • SET { WITH / WITHOUT } OIDS
    • SET
    • Foreign key constraints at column and table level
    • CLUSTER 选项:CLUSTER ON index_name SET WITHOUT CLUSTER
    • custom constraintsADD CONSTRAINT ALTER CONSTRAINT VALIDATE CONSTRAINT
    • Modifications to tablespace and storage parameters
    • Stream replication settings ( REPLICAclause with keywords)
  12. rules are not supported

    This is a feature that confuses many people in PostgreSQL, and Klustron chooses not to support it.

  13. Functions not supported by Klustron 1.1 but supported from Klustron 1.2

    Trigger, materialized view, policy (ie row level security), domain

2. Features that are different from PostgreSQL

  1. 加列 ALTER TABLE ADD COLUMN

    For a newly added column in an existing table, if there is a default value, the default value cannot be an expression that MySQL cannot execute, but can only be a constant or an expression that MySQL can execute. For example, functions and operators in expressions must exist and be supported in MySQL.

    In addition, if the newly added column is of sequence type, then only one such sequence column can be added to the table, because Klustron will use MySQL's auto-increment column to assign values to new fields of existing rows. Each table in MySQL only allows one auto-increment column.

  2. indexed'nulls first' / 'nulls last'

    Always use MySQL's default, as opposed to PostgreSQL's default.

  3. Data type support

    • The valid range of timestamps is reduced to[ '0000-01-01 00:00:00.000000' , '9999-12-31 23:59:59.999999' ].
    • The valid range of the date type has been narrowed to[ '0000-01-01' , '9999-12-31' ].

END