GitHub user xinhuitian closed a discussion: Fail to create table with partition 
description with MAXVALUE

Hello, I'm currently testing cb with the bootcamp 000-cbdb-sandbox docker file.
When I run a query similar as the below one:
```
gpadmin=# CREATE TABLE test_partition (
    name character varying,
    last_modified_date timestamp without time zone
)
WITH (appendoptimized=true, orientation=column, compresslevel=1)
DISTRIBUTED BY (name)
PARTITION BY RANGE (last_modified_date)
(
    PARTITION partition_202411 START ('2024-11-01 00:00:00') INCLUSIVE END 
('2024-12-01 00:00:00') EXCLUSIVE,
    PARTITION partition_max START ('2024-12-01 00:00:00') INCLUSIVE END 
(MAXVALUE)
);
```
I got the following error:
```
ERROR:  cannot use column reference in partition bound expression
LINE 10: ...n_max START ('2024-12-01 00:00:00') INCLUSIVE END (MAXVALUE)
```

Split it to another query works fine:
```
CREATE TABLE partition_max partition of test_partition for values from 
('2024-12-01 00:00:00') to (MAXVALUE);
```
Seems like MAXVALUE in the first query is parsed to a column ref. Is it as 
expected or a bug?

GitHub link: https://github.com/apache/cloudberry/discussions/791

----
This is an automatically sent email for dev@cloudberry.apache.org.
To unsubscribe, please send an email to: dev-unsubscr...@cloudberry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@cloudberry.apache.org
For additional commands, e-mail: dev-h...@cloudberry.apache.org

Reply via email to