| From: | Alexander Lakhin <exclusion(at)gmail(dot)com> |
|---|---|
| To: | Alexander Korotkov <aekorotkov(at)gmail(dot)com>, Dmitry Koval <d(dot)koval(at)postgrespro(dot)ru> |
| Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Add SPLIT PARTITION/MERGE PARTITIONS commands |
| Date: | 2024-05-11 09:00:00 |
| Message-ID: | 86b4f1e3-0b5d-315c-9225-19860d64d685@gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hello Dmitry and Alexander,
Please look at one more anomaly with temporary tables:
CREATE TEMP TABLE t (a int) PARTITION BY RANGE (a);
CREATE TEMP TABLE tp_0 PARTITION OF t FOR VALUES FROM (0) TO (1) ;
CREATE TEMP TABLE tp_1 PARTITION OF t FOR VALUES FROM (1) TO (2);
ALTER TABLE t MERGE PARTITIONS (tp_0, tp_1) INTO tp_0;
-- succeeds, but:
ALTER TABLE t SPLIT PARTITION tp_0 INTO
(PARTITION tp_0 FOR VALUES FROM (0) TO (1), PARTITION tp_1 FOR VALUES FROM (1) TO (2));
-- fails with:
ERROR: relation "tp_0" already exists
Though the same SPLIT succeeds with non-temporary tables...
Best regards,
Alexander
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alvaro Herrera | 2024-05-11 09:40:01 | Re: cataloguing NOT NULL constraints |
| Previous Message | Tatsuo Ishii | 2024-05-11 07:23:07 | Re: Row pattern recognition |