postgres 创建 table

postgres create table

我正在尝试创建 table 不幸的是我遇到了错误。 这是我 运行:

的查询
CREATE TABLE UpStreamParam (
macaddress  CHAR(20),
datats BIGINT,
cmtstimestamp BIGINT,
modulation INT,
chnlidx  INT,
severity BIGINT,
rxpower  FLOAT,
sigqnoise FLOAT,
noisedeviation  FLOAT,
prefecber  FLOAT,
uncorrectables  BIGINT)
STORED AS ORC tblproperties ("orc.compress"="SNAPPY", "orc.bloom.filter.columns"="macaddress")
LOCATION '/usr/hive/warehouse/UpStreamParam'
PARTITIONED BY(cmtsid CHAR(50), date int);

这是我遇到的错误

ERROR:  syntax error at or near "STORED"
LINE 21: STORED AS ORC tblproperties ("orc.compress"="SNAPPY", "orc.b...

知道如何解决吗?

我有 8.4.20 版本

你必须删除这部分:

STORED AS ORC tblproperties ("orc.compress"="SNAPPY", "orc.bloom.filter.columns"="macaddress")
LOCATION '/usr/hive/warehouse/UpStreamParam'
PARTITIONED BY(cmtsid CHAR(50), date int);

因为 PostgreSQL 不允许这些类型的物理存储规范。见 Create Table page.