Created
May 20, 2021 14:20
-
-
Save vitormil/4ed26b0112a5dde52861bb6b84330637 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create table test (id int, a timestamp) partition by list ( (trunc(extract(second from a))::int % 3)); | |
create table test01 partition of test for values in (0); | |
create table test02 partition of test for values in (1); | |
create table test03 partition of test for values in (2); | |
insert into test values (555, now()); | |
select * | |
from test | |
where id = 555; | |
select 0, * from test01 | |
union all | |
select 1, * from test02 | |
union all | |
select 2, * from test03; | |
truncate table test01; | |
drop table test; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment