Updated on 2025-10-22 GMT+08:00

U0100047: Enter the data type based on the actual scenario of the source statement

Description

GaussDB Distributed does not support generated columns.

Database Type and Version

  • Source database type and version: Oracle versions supported by UGO
  • Target database type and version: GaussDB Distributed versions supported by UGO

Syntax Example

Oracle script:

CREATE TABLE test_con (
    createtime TIMESTAMP(3),
    createdate as (TO_CHAR(createtime, 'YYYYMMDD'))
);

Suggestion

1. Change the table with generated columns to a common table and the data type to TEXT.

2. Use a trigger to simulate generated columns.

Script compatible with GaussDB:

CREATE TABLE test_con (
    createtime TIMESTAMP(3),
    createdate text
);
CREATE OR REPLACE FUNCTION dsc_fn_generated_test_con()
RETURN trigger
AS
BEGIN
NEW.createdate =  (NEW.createtime, 'YYYYMMDD');
RETURN NEW;
END;
/
CREATE TRIGGER dsc_tr_generated_test_con
BEFORE INSERT OR UPDATE
ON test_con
FOR EACH ROW
EXECUTE PROCEDURE dsc_fn_generated_test_con();
/