Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
9f989a85
Commit
9f989a85
authored
May 07, 2021
by
Peter Eisentraut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix typo
parent
4e8c0f1a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
src/backend/partitioning/partbounds.c
src/backend/partitioning/partbounds.c
+1
-1
src/test/regress/expected/create_table.out
src/test/regress/expected/create_table.out
+3
-3
src/test/regress/sql/create_table.sql
src/test/regress/sql/create_table.sql
+2
-2
No files found.
src/backend/partitioning/partbounds.c
View file @
9f989a85
...
...
@@ -2899,7 +2899,7 @@ check_new_partition_bound(char *relname, Relation parent,
ereport
(
ERROR
,
(
errcode
(
ERRCODE_INVALID_OBJECT_DEFINITION
),
errmsg
(
"every hash partition modulus must be a factor of the next larger modulus"
),
errdetail
(
"The new modulus %d is not factor of %d, the modulus of existing partition
\"
%s
\"
."
,
errdetail
(
"The new modulus %d is not
a
factor of %d, the modulus of existing partition
\"
%s
\"
."
,
spec
->
modulus
,
next_modulus
,
get_rel_name
(
partdesc
->
oids
[
boundinfo
->
indexes
[
offset
+
1
]]))));
}
...
...
src/test/regress/expected/create_table.out
View file @
9f989a85
...
...
@@ -780,14 +780,14 @@ CREATE TABLE hash_parted (
CREATE TABLE hpart_1 PARTITION OF hash_parted FOR VALUES WITH (MODULUS 10, REMAINDER 0);
CREATE TABLE hpart_2 PARTITION OF hash_parted FOR VALUES WITH (MODULUS 50, REMAINDER 1);
CREATE TABLE hpart_3 PARTITION OF hash_parted FOR VALUES WITH (MODULUS 200, REMAINDER 2);
-- modulus 25 is factor of modulus of 50 but 10 is not factor of 25.
-- modulus 25 is factor of modulus of 50 but 10 is not
a
factor of 25.
CREATE TABLE fail_part PARTITION OF hash_parted FOR VALUES WITH (MODULUS 25, REMAINDER 3);
ERROR: every hash partition modulus must be a factor of the next larger modulus
DETAIL: The new modulus 25 is not divisible by 10, the modulus of existing partition "hpart_1".
-- previous modulus 50 is factor of 150 but this modulus is not factor of next modulus 200.
-- previous modulus 50 is factor of 150 but this modulus is not
a
factor of next modulus 200.
CREATE TABLE fail_part PARTITION OF hash_parted FOR VALUES WITH (MODULUS 150, REMAINDER 3);
ERROR: every hash partition modulus must be a factor of the next larger modulus
DETAIL: The new modulus 150 is not factor of 200, the modulus of existing partition "hpart_3".
DETAIL: The new modulus 150 is not
a
factor of 200, the modulus of existing partition "hpart_3".
-- trying to specify range for the hash partitioned table
CREATE TABLE fail_part PARTITION OF hash_parted FOR VALUES FROM ('a', 1) TO ('z');
ERROR: invalid bound specification for a hash partition
...
...
src/test/regress/sql/create_table.sql
View file @
9f989a85
...
...
@@ -631,9 +631,9 @@ CREATE TABLE hash_parted (
CREATE
TABLE
hpart_1
PARTITION
OF
hash_parted
FOR
VALUES
WITH
(
MODULUS
10
,
REMAINDER
0
);
CREATE
TABLE
hpart_2
PARTITION
OF
hash_parted
FOR
VALUES
WITH
(
MODULUS
50
,
REMAINDER
1
);
CREATE
TABLE
hpart_3
PARTITION
OF
hash_parted
FOR
VALUES
WITH
(
MODULUS
200
,
REMAINDER
2
);
-- modulus 25 is factor of modulus of 50 but 10 is not factor of 25.
-- modulus 25 is factor of modulus of 50 but 10 is not
a
factor of 25.
CREATE
TABLE
fail_part
PARTITION
OF
hash_parted
FOR
VALUES
WITH
(
MODULUS
25
,
REMAINDER
3
);
-- previous modulus 50 is factor of 150 but this modulus is not factor of next modulus 200.
-- previous modulus 50 is factor of 150 but this modulus is not
a
factor of next modulus 200.
CREATE
TABLE
fail_part
PARTITION
OF
hash_parted
FOR
VALUES
WITH
(
MODULUS
150
,
REMAINDER
3
);
-- trying to specify range for the hash partitioned table
CREATE
TABLE
fail_part
PARTITION
OF
hash_parted
FOR
VALUES
FROM
(
'a'
,
1
)
TO
(
'z'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment