create_time_partitions may fail with long table names
- Dominant language
- C
- Stars
- 12.8k
- Forks
- 794
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 31
Description
```SQL
SET citus.shard_replication_factor TO 2;
CREATE TABLE
time_series_events_very_veery_looooooooooooooong_named_table (event_time timestamp, event int, user_id int)
partition by range (event_time);
SELECT create_distributed_table('time_series_events_very_veery_looooooooooooooong_named_table', 'user_id');
SELECT create_time_partitions(table_name:='time_series_events_very_veery_looooooooooooooong_named_table',
partition_interval:= '1 month',
end_at:= '2021-01-01',
start_from:='2020-01-01');
ERROR: could not form array type name for type "time_series_events_very_veery_looooooooooooooon_b7a98e08_108896"
CONTEXT: while executing command on localhost:9701
SQL statement "CREATE TABLE public.time_series_events_very_veery_looooooooooooooong_named_p2020_09 PARTITION OF public.time_series_events_very_veery_looooooooooooooong_named_table FOR VALUES FROM ('2020-09-01 00:00:00') TO ('2020-10-01 00:00:00')"
PL/pgSQL function create_time_partitions(regclass,interval,timestamp with time zone,timestamp with time zone) line 28 at EXECUTE
Time: 481.143 ms
```
Contributor guide
Assessment
This issue has not been assessed yet.