-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add formatting of CREATE PARTITION STATEMENT.
- Loading branch information
Showing
3 changed files
with
74 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
CREATE TABLE kbln ( | ||
id integer NOT NULL, | ||
blank_series varchar(50) NOT NULL, | ||
company_id varchar(8)) PARTITION BY | ||
RANGE ( id); | ||
|
||
CREATE TABLE kbln_p0 PARTITION OF kbln FOR | ||
VALUES FROM ( MINVALUE) TO ( 500000) PARTITION BY HASH ( blank_series); | ||
|
||
CREATE TABLE kbln_p0_1 PARTITION OF kbln_p0 FOR | ||
VALUES WITH ( MODULUS 2, REMAINDER 0); | ||
|
||
CREATE TABLE kbln_p0_2 PARTITION OF kbln_p0 FOR | ||
VALUES WITH ( MODULUS 2, REMAINDER 1); | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
CREATE TABLE kbln ( | ||
id integer NOT NULL, | ||
blank_series varchar(50) NOT NULL, | ||
company_id varchar(8) | ||
) | ||
PARTITION BY RANGE (id); | ||
|
||
CREATE TABLE kbln_p0 OF kbln | ||
FOR VALUES FROM (MINVALUE) TO (500000) | ||
PARTITION BY HASH (blank_series); | ||
|
||
CREATE TABLE kbln_p0_1 OF kbln_p0 | ||
FOR VALUES WITH (MODULUS 2, REMAINDER 0); | ||
|
||
CREATE TABLE kbln_p0_2 OF kbln_p0 | ||
FOR VALUES WITH (MODULUS 2, REMAINDER 1); | ||
|