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
1561684a
Commit
1561684a
authored
Jun 11, 1997
by
Vadim B. Mikheev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Compare 'char' and 'text' lexicographically.
parent
0346ab71
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
src/backend/access/nbtree/nbtcompare.c
src/backend/access/nbtree/nbtcompare.c
+5
-6
No files found.
src/backend/access/nbtree/nbtcompare.c
View file @
1561684a
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtcompare.c,v 1.
9 1997/05/22 00:07:15 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtcompare.c,v 1.
10 1997/06/11 05:20:05 vadim
Exp $
*
*
* NOTES
* NOTES
* These functions are stored in pg_amproc. For each operator class
* These functions are stored in pg_amproc. For each operator class
...
@@ -98,7 +98,7 @@ btabstimecmp(AbsoluteTime a, AbsoluteTime b)
...
@@ -98,7 +98,7 @@ btabstimecmp(AbsoluteTime a, AbsoluteTime b)
int32
int32
btcharcmp
(
char
a
,
char
b
)
btcharcmp
(
char
a
,
char
b
)
{
{
return
((
int32
)
(
a
-
b
));
return
((
int32
)
(
(
uint8
)
a
-
(
uint8
)
b
));
}
}
int32
int32
...
@@ -135,9 +135,9 @@ int32
...
@@ -135,9 +135,9 @@ int32
bttextcmp
(
struct
varlena
*
a
,
struct
varlena
*
b
)
bttextcmp
(
struct
varlena
*
a
,
struct
varlena
*
b
)
{
{
int
res
;
int
res
;
unsigned
char
*
ap
,
*
bp
;
#ifdef USE_LOCALE
#ifdef USE_LOCALE
unsigned
char
*
ap
,
*
bp
;
int
la
=
VARSIZE
(
a
)
-
VARHDRSZ
;
int
la
=
VARSIZE
(
a
)
-
VARHDRSZ
;
int
lb
=
VARSIZE
(
b
)
-
VARHDRSZ
;
int
lb
=
VARSIZE
(
b
)
-
VARHDRSZ
;
...
@@ -155,7 +155,6 @@ bttextcmp(struct varlena *a, struct varlena *b)
...
@@ -155,7 +155,6 @@ bttextcmp(struct varlena *a, struct varlena *b)
pfree
(
bp
);
pfree
(
bp
);
#else
#else
char
*
ap
,
*
bp
;
int
len
=
VARSIZE
(
a
);
int
len
=
VARSIZE
(
a
);
/* len is the length of the shorter of the two strings */
/* len is the length of the shorter of the two strings */
...
@@ -164,8 +163,8 @@ bttextcmp(struct varlena *a, struct varlena *b)
...
@@ -164,8 +163,8 @@ bttextcmp(struct varlena *a, struct varlena *b)
len
-=
VARHDRSZ
;
len
-=
VARHDRSZ
;
ap
=
VARDATA
(
a
);
ap
=
(
unsigned
char
*
)
VARDATA
(
a
);
bp
=
VARDATA
(
b
);
bp
=
(
unsigned
char
*
)
VARDATA
(
b
);
/*
/*
* If the two strings differ in the first len bytes, or if they're
* If the two strings differ in the first len bytes, or if they're
...
...
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