https://www.postgresql.org/docs/10/ddl-partitioning.html
https://www.postgresql.org/docs/9.1/sql-createforeigntable.html
https://www.postgresql.org/docs/9.1/sql-dropforeigntable.html
BEGIN;
CREATE TABLE IF NOT EXISTS test_dim_segment
(
aid bigint
,segment_id bigint
,segment_name text
,ds text not null
)
PARTITION BY LIST(ds);
COMMIT;
BEGIN;
CREATE FOREIGN TABLE IF NOT EXISTS test_dim_segment_odps
(
aid bigint
,segment_id bigint
,segment_name text
,ds text
)
SERVER odps_server
OPTIONS (project_name 'test', table_name 'test_dim_segment');
COMMIT;
CREATE TABLE IF NOT EXISTS test_dim_segment_20201009 PARTITION OF test_dim_segment FOR VALUES IN ('20201009')
Exception in thread "main" com.alibaba.fastsql.sql.parser.ParserException: syntax error, error in :'1009 PARTITION OF test_dim_segment , pos 62, line 1, column 54, token IDENTIFIER PARTITION
at com.alibaba.fastsql.sql.parser.SQLParser.printError(SQLParser.java:430)
at com.alibaba.fastsql.sql.parser.SQLStatementParser.parseStatementList(SQLStatementParser.java:580)
at com.alibaba.fastsql.sql.parser.SQLStatementParser.parseStatementList(SQLStatementParser.java:97)
at com.alibaba.fastsql.sql.SQLUtils.parseSingleStatement(SQLUtils.java:569)
at com.alimama.FastSqlDemo.main(FastSqlDemo.java:26)
暂无答案!
目前还没有任何答案,快来回答吧!