Skip to content

openGauss

收藏

修改表空间

-- 普通表
alter table <table_name> set tablespace <table_space>;

-- 分区表
alter table <table_name> move partition <table_partition> tablespace <table_space>;

-- 索引
alter index <index_name> set tablespace <table_space>;

兼容性

https://docs-opengauss.osinfra.cn/zh/docs/5.0.0/docs/SQLReference/CREATE-DATABASE.html

兼容性 兼容的数据库类型 说明
A Oracle 数据库会将空字符串作为 NULL 处理,数据类型 DATE 会被替换为 TIMESTAMP(0) WITHOUT TIME ZONE
B MySQL 将字符串转换成整数时,如何输入不合法, B 兼容性会将输入转换为 0,而其它兼容性则会报错。
C Teradata
PG PostgreSQL PG 兼容性下,CHARVARCHAR 已字符为计数单位,其它兼容性以字节为计数单位。
create database demo encoding = 'UTF8' dbcompatibility = 'PG';

压缩

create table ods.ods_dwd_urs_claim (

)
with (
    orientation=column,
    compression=yes
);

认证

https://blog.csdn.net/weixin_48456383/article/details/124019202