From af7316a905d7708f1d69475017ff5a4267ec7b3f Mon Sep 17 00:00:00 2001 From: jiangML <1060319118@qq.com> Date: Mon, 16 Dec 2024 15:05:28 +0800 Subject: [PATCH] Add oid column for pg_description, pg_attribute, pg_type, pg_attrdef table of OpenGauss (#34073) * Add oid column for pg_description, pg_attribute, pg_type, pg_attrdef table of OpenGauss * Change default version from 12.3 to 9.2.4 of openGauss --- .../constant/OpenGaussProtocolDefaultVersionProvider.java | 2 +- .../resources/schema/opengauss/pg_catalog/pg_attrdef.yaml | 8 ++++++++ .../schema/opengauss/pg_catalog/pg_attribute.yaml | 8 ++++++++ .../schema/opengauss/pg_catalog/pg_description.yaml | 8 ++++++++ .../resources/schema/opengauss/pg_catalog/pg_type.yaml | 8 ++++++++ 5 files changed, 33 insertions(+), 1 deletion(-) diff --git a/db-protocol/opengauss/src/main/java/org/apache/shardingsphere/db/protocol/opengauss/constant/OpenGaussProtocolDefaultVersionProvider.java b/db-protocol/opengauss/src/main/java/org/apache/shardingsphere/db/protocol/opengauss/constant/OpenGaussProtocolDefaultVersionProvider.java index cc642e6f4322b..79aaeee4c06a7 100644 --- a/db-protocol/opengauss/src/main/java/org/apache/shardingsphere/db/protocol/opengauss/constant/OpenGaussProtocolDefaultVersionProvider.java +++ b/db-protocol/opengauss/src/main/java/org/apache/shardingsphere/db/protocol/opengauss/constant/OpenGaussProtocolDefaultVersionProvider.java @@ -26,7 +26,7 @@ public final class OpenGaussProtocolDefaultVersionProvider implements DatabasePr @Override public String provide() { - return "12.3"; + return "9.2.4"; } @Override diff --git a/infra/database/type/opengauss/src/main/resources/schema/opengauss/pg_catalog/pg_attrdef.yaml b/infra/database/type/opengauss/src/main/resources/schema/opengauss/pg_catalog/pg_attrdef.yaml index f9571994ff866..1890fff03e725 100644 --- a/infra/database/type/opengauss/src/main/resources/schema/opengauss/pg_catalog/pg_attrdef.yaml +++ b/infra/database/type/opengauss/src/main/resources/schema/opengauss/pg_catalog/pg_attrdef.yaml @@ -17,6 +17,14 @@ name: pg_attrdef columns: + oid: + caseSensitive: true + dataType: -5 + generated: false + name: oid + primaryKey: false + unsigned: false + visible: true adrelid: caseSensitive: true dataType: -5 diff --git a/infra/database/type/opengauss/src/main/resources/schema/opengauss/pg_catalog/pg_attribute.yaml b/infra/database/type/opengauss/src/main/resources/schema/opengauss/pg_catalog/pg_attribute.yaml index 27546dde65fc3..8cbfe78035e13 100644 --- a/infra/database/type/opengauss/src/main/resources/schema/opengauss/pg_catalog/pg_attribute.yaml +++ b/infra/database/type/opengauss/src/main/resources/schema/opengauss/pg_catalog/pg_attribute.yaml @@ -17,6 +17,14 @@ name: pg_attribute columns: + oid: + caseSensitive: true + dataType: -5 + generated: false + name: oid + primaryKey: false + unsigned: false + visible: true attrelid: caseSensitive: true dataType: -5 diff --git a/infra/database/type/opengauss/src/main/resources/schema/opengauss/pg_catalog/pg_description.yaml b/infra/database/type/opengauss/src/main/resources/schema/opengauss/pg_catalog/pg_description.yaml index 12cd434d31223..ba4f68786d36f 100644 --- a/infra/database/type/opengauss/src/main/resources/schema/opengauss/pg_catalog/pg_description.yaml +++ b/infra/database/type/opengauss/src/main/resources/schema/opengauss/pg_catalog/pg_description.yaml @@ -17,6 +17,14 @@ name: pg_description columns: + oid: + caseSensitive: true + dataType: -5 + generated: false + name: oid + primaryKey: false + unsigned: false + visible: true objoid: caseSensitive: true dataType: -5 diff --git a/infra/database/type/opengauss/src/main/resources/schema/opengauss/pg_catalog/pg_type.yaml b/infra/database/type/opengauss/src/main/resources/schema/opengauss/pg_catalog/pg_type.yaml index 4fb6520270b53..9a56f9b2b714b 100644 --- a/infra/database/type/opengauss/src/main/resources/schema/opengauss/pg_catalog/pg_type.yaml +++ b/infra/database/type/opengauss/src/main/resources/schema/opengauss/pg_catalog/pg_type.yaml @@ -17,6 +17,14 @@ name: pg_type columns: + oid: + caseSensitive: true + dataType: -5 + generated: false + name: oid + primaryKey: false + unsigned: false + visible: true typname: caseSensitive: true dataType: 12