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
69a59150
Commit
69a59150
authored
Nov 11, 2001
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Defend against brain-dead QNX implementation of qsort().
Per report from Bernd Tegge, 10-Nov-01.
parent
c5c97318
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
src/backend/utils/sort/tuplesort.c
src/backend/utils/sort/tuplesort.c
+7
-2
No files found.
src/backend/utils/sort/tuplesort.c
View file @
69a59150
...
@@ -78,7 +78,7 @@
...
@@ -78,7 +78,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
* Portions Copyright (c) 1994, Regents of the University of California
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/sort/tuplesort.c,v 1.2
0 2001/10/28 06:25:57 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/sort/tuplesort.c,v 1.2
1 2001/11/11 22:00:25 tgl
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -1881,8 +1881,13 @@ comparetup_index(Tuplesortstate *state, const void *a, const void *b)
...
@@ -1881,8 +1881,13 @@ comparetup_index(Tuplesortstate *state, const void *a, const void *b)
* equal they *must* get compared at some stage of the sort ---
* equal they *must* get compared at some stage of the sort ---
* otherwise the sort algorithm wouldn't have checked whether one must
* otherwise the sort algorithm wouldn't have checked whether one must
* appear before the other.
* appear before the other.
*
* Some rather brain-dead implementations of qsort will sometimes
* call the comparison routine to compare a value to itself. (At this
* writing only QNX 4 is known to do such silly things.) Don't raise
* a bogus error in that case.
*/
*/
if
(
state
->
enforceUnique
&&
!
equal_hasnull
)
if
(
state
->
enforceUnique
&&
!
equal_hasnull
&&
tuple1
!=
tuple2
)
elog
(
ERROR
,
"Cannot create unique index. Table contains non-unique values"
);
elog
(
ERROR
,
"Cannot create unique index. Table contains non-unique values"
);
return
0
;
return
0
;
...
...
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