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
4ba61a48
Commit
4ba61a48
authored
Oct 25, 2010
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Work around rounding misbehavior exposed by buildfarm.
parent
2d01ec07
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
src/backend/catalog/pg_enum.c
src/backend/catalog/pg_enum.c
+10
-0
No files found.
src/backend/catalog/pg_enum.c
View file @
4ba61a48
...
@@ -287,6 +287,16 @@ restart:
...
@@ -287,6 +287,16 @@ restart:
other_nbr_en
=
(
Form_pg_enum
)
GETSTRUCT
(
existing
[
other_nbr_index
]);
other_nbr_en
=
(
Form_pg_enum
)
GETSTRUCT
(
existing
[
other_nbr_index
]);
newelemorder
=
(
nbr_en
->
enumsortorder
+
newelemorder
=
(
nbr_en
->
enumsortorder
+
other_nbr_en
->
enumsortorder
)
/
2
;
other_nbr_en
->
enumsortorder
)
/
2
;
/*
* On some machines, newelemorder may be in a register that's
* wider than float4. We need to force it to be rounded to
* float4 precision before making the following comparisons,
* or we'll get wrong results. (Such behavior violates the C
* standard, but fixing the compilers is out of our reach.)
*/
newelemorder
=
DatumGetFloat4
(
Float4GetDatum
(
newelemorder
));
if
(
newelemorder
==
nbr_en
->
enumsortorder
||
if
(
newelemorder
==
nbr_en
->
enumsortorder
||
newelemorder
==
other_nbr_en
->
enumsortorder
)
newelemorder
==
other_nbr_en
->
enumsortorder
)
{
{
...
...
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