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
aebc4e67
Commit
aebc4e67
authored
Dec 02, 2009
by
Teodor Sigaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Preventing intersection of ranges during page split. Changes are only
optimization, so don't backpatch.
parent
59ed94ad
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
145 additions
and
83 deletions
+145
-83
contrib/btree_gist/btree_cash.c
contrib/btree_gist/btree_cash.c
+11
-6
contrib/btree_gist/btree_date.c
contrib/btree_gist/btree_date.c
+10
-6
contrib/btree_gist/btree_float4.c
contrib/btree_gist/btree_float4.c
+11
-6
contrib/btree_gist/btree_float8.c
contrib/btree_gist/btree_float8.c
+11
-6
contrib/btree_gist/btree_inet.c
contrib/btree_gist/btree_inet.c
+11
-6
contrib/btree_gist/btree_int2.c
contrib/btree_gist/btree_int2.c
+11
-6
contrib/btree_gist/btree_int4.c
contrib/btree_gist/btree_int4.c
+11
-6
contrib/btree_gist/btree_int8.c
contrib/btree_gist/btree_int8.c
+11
-6
contrib/btree_gist/btree_interval.c
contrib/btree_gist/btree_interval.c
+10
-7
contrib/btree_gist/btree_macaddr.c
contrib/btree_gist/btree_macaddr.c
+10
-8
contrib/btree_gist/btree_oid.c
contrib/btree_gist/btree_oid.c
+11
-6
contrib/btree_gist/btree_time.c
contrib/btree_gist/btree_time.c
+10
-6
contrib/btree_gist/btree_ts.c
contrib/btree_gist/btree_ts.c
+10
-6
contrib/btree_gist/btree_utils_var.c
contrib/btree_gist/btree_utils_var.c
+7
-2
No files found.
contrib/btree_gist/btree_cash.c
View file @
aebc4e67
/*
* $PostgreSQL: pgsql/contrib/btree_gist/btree_cash.c,v 1.
9 2009/06/11 14:48:50 momjian
Exp $
* $PostgreSQL: pgsql/contrib/btree_gist/btree_cash.c,v 1.
10 2009/12/02 13:13:24 teodor
Exp $
*/
#include "btree_gist.h"
#include "btree_utils_num.h"
...
...
@@ -57,13 +57,18 @@ gbt_cashlt(const void *a, const void *b)
static
int
gbt_cashkey_cmp
(
const
void
*
a
,
const
void
*
b
)
{
cashKEY
*
ia
=
(
cashKEY
*
)(((
Nsrt
*
)
a
)
->
t
);
cashKEY
*
ib
=
(
cashKEY
*
)(((
Nsrt
*
)
b
)
->
t
);
if
(
*
(
Cash
*
)
&
(((
Nsrt
*
)
a
)
->
t
[
0
])
>
*
(
Cash
*
)
&
(((
Nsrt
*
)
b
)
->
t
[
0
]))
return
1
;
else
if
(
*
(
Cash
*
)
&
(((
Nsrt
*
)
a
)
->
t
[
0
])
<
*
(
Cash
*
)
&
(((
Nsrt
*
)
b
)
->
t
[
0
]))
return
-
1
;
return
0
;
if
(
ia
->
lower
==
ib
->
lower
)
{
if
(
ia
->
upper
==
ib
->
upper
)
return
0
;
return
(
ia
->
upper
>
ib
->
upper
)
?
1
:
-
1
;
}
return
(
ia
->
lower
>
ib
->
lower
)
?
1
:
-
1
;
}
...
...
contrib/btree_gist/btree_date.c
View file @
aebc4e67
/*
* $PostgreSQL: pgsql/contrib/btree_gist/btree_date.c,v 1.
7 2009/06/11 14:48:50 momjian
Exp $
* $PostgreSQL: pgsql/contrib/btree_gist/btree_date.c,v 1.
8 2009/12/02 13:13:24 teodor
Exp $
*/
#include "btree_gist.h"
#include "btree_utils_num.h"
...
...
@@ -73,11 +73,15 @@ gbt_datelt(const void *a, const void *b)
static
int
gbt_datekey_cmp
(
const
void
*
a
,
const
void
*
b
)
{
if
(
gbt_dategt
((
void
*
)
&
(((
Nsrt
*
)
a
)
->
t
[
0
]),
(
void
*
)
&
(((
Nsrt
*
)
b
)
->
t
[
0
])))
return
1
;
else
if
(
gbt_datelt
((
void
*
)
&
(((
Nsrt
*
)
a
)
->
t
[
0
]),
(
void
*
)
&
(((
Nsrt
*
)
b
)
->
t
[
0
])))
return
-
1
;
return
0
;
dateKEY
*
ia
=
(
dateKEY
*
)(((
Nsrt
*
)
a
)
->
t
);
dateKEY
*
ib
=
(
dateKEY
*
)(((
Nsrt
*
)
b
)
->
t
);
int
res
;
res
=
DatumGetInt32
(
DirectFunctionCall2
(
date_cmp
,
DateADTGetDatum
(
ia
->
lower
),
DateADTGetDatum
(
ib
->
lower
)));
if
(
res
==
0
)
return
DatumGetInt32
(
DirectFunctionCall2
(
date_cmp
,
DateADTGetDatum
(
ia
->
upper
),
DateADTGetDatum
(
ib
->
upper
)));
return
res
;
}
...
...
contrib/btree_gist/btree_float4.c
View file @
aebc4e67
/*
* $PostgreSQL: pgsql/contrib/btree_gist/btree_float4.c,v 1.
8 2009/06/11 14:48:50 momjian
Exp $
* $PostgreSQL: pgsql/contrib/btree_gist/btree_float4.c,v 1.
9 2009/12/02 13:13:24 teodor
Exp $
*/
#include "btree_gist.h"
#include "btree_utils_num.h"
...
...
@@ -56,13 +56,18 @@ gbt_float4lt(const void *a, const void *b)
static
int
gbt_float4key_cmp
(
const
void
*
a
,
const
void
*
b
)
{
float4KEY
*
ia
=
(
float4KEY
*
)(((
Nsrt
*
)
a
)
->
t
);
float4KEY
*
ib
=
(
float4KEY
*
)(((
Nsrt
*
)
b
)
->
t
);
if
(
*
(
float4
*
)
&
(((
Nsrt
*
)
a
)
->
t
[
0
])
>
*
(
float4
*
)
&
(((
Nsrt
*
)
b
)
->
t
[
0
]))
return
1
;
else
if
(
*
(
float4
*
)
&
(((
Nsrt
*
)
a
)
->
t
[
0
])
<
*
(
float4
*
)
&
(((
Nsrt
*
)
b
)
->
t
[
0
]))
return
-
1
;
return
0
;
if
(
ia
->
lower
==
ib
->
lower
)
{
if
(
ia
->
upper
==
ib
->
upper
)
return
0
;
return
(
ia
->
upper
>
ib
->
upper
)
?
1
:
-
1
;
}
return
(
ia
->
lower
>
ib
->
lower
)
?
1
:
-
1
;
}
...
...
contrib/btree_gist/btree_float8.c
View file @
aebc4e67
/*
* $PostgreSQL: pgsql/contrib/btree_gist/btree_float8.c,v 1.
8 2009/06/11 14:48:50 momjian
Exp $
* $PostgreSQL: pgsql/contrib/btree_gist/btree_float8.c,v 1.
9 2009/12/02 13:13:24 teodor
Exp $
*/
#include "btree_gist.h"
#include "btree_utils_num.h"
...
...
@@ -57,13 +57,18 @@ gbt_float8lt(const void *a, const void *b)
static
int
gbt_float8key_cmp
(
const
void
*
a
,
const
void
*
b
)
{
float8KEY
*
ia
=
(
float8KEY
*
)(((
Nsrt
*
)
a
)
->
t
);
float8KEY
*
ib
=
(
float8KEY
*
)(((
Nsrt
*
)
b
)
->
t
);
if
(
*
(
float8
*
)
&
(((
Nsrt
*
)
a
)
->
t
[
0
])
>
*
(
float8
*
)
&
(((
Nsrt
*
)
b
)
->
t
[
0
]))
return
1
;
else
if
(
*
(
float8
*
)
&
(((
Nsrt
*
)
a
)
->
t
[
0
])
<
*
(
float8
*
)
&
(((
Nsrt
*
)
b
)
->
t
[
0
]))
return
-
1
;
return
0
;
if
(
ia
->
lower
==
ib
->
lower
)
{
if
(
ia
->
upper
==
ib
->
upper
)
return
0
;
return
(
ia
->
upper
>
ib
->
upper
)
?
1
:
-
1
;
}
return
(
ia
->
lower
>
ib
->
lower
)
?
1
:
-
1
;
}
...
...
contrib/btree_gist/btree_inet.c
View file @
aebc4e67
/*
* $PostgreSQL: pgsql/contrib/btree_gist/btree_inet.c,v 1.1
0 2009/06/11 14:48:50 momjian
Exp $
* $PostgreSQL: pgsql/contrib/btree_gist/btree_inet.c,v 1.1
1 2009/12/02 13:13:24 teodor
Exp $
*/
#include "btree_gist.h"
#include "btree_utils_num.h"
...
...
@@ -60,13 +60,18 @@ gbt_inetlt(const void *a, const void *b)
static
int
gbt_inetkey_cmp
(
const
void
*
a
,
const
void
*
b
)
{
inetKEY
*
ia
=
(
inetKEY
*
)(((
Nsrt
*
)
a
)
->
t
);
inetKEY
*
ib
=
(
inetKEY
*
)(((
Nsrt
*
)
b
)
->
t
);
if
(
*
(
double
*
)
(
&
((
Nsrt
*
)
a
)
->
t
[
0
])
>
*
(
double
*
)
(
&
((
Nsrt
*
)
b
)
->
t
[
0
]))
return
1
;
else
if
(
*
(
double
*
)
(
&
((
Nsrt
*
)
a
)
->
t
[
0
])
<
*
(
double
*
)
(
&
((
Nsrt
*
)
b
)
->
t
[
0
]))
return
-
1
;
return
0
;
if
(
ia
->
lower
==
ib
->
lower
)
{
if
(
ia
->
upper
==
ib
->
upper
)
return
0
;
return
(
ia
->
upper
>
ib
->
upper
)
?
1
:
-
1
;
}
return
(
ia
->
lower
>
ib
->
lower
)
?
1
:
-
1
;
}
...
...
contrib/btree_gist/btree_int2.c
View file @
aebc4e67
/*
* $PostgreSQL: pgsql/contrib/btree_gist/btree_int2.c,v 1.
8 2009/06/11 14:48:50 momjian
Exp $
* $PostgreSQL: pgsql/contrib/btree_gist/btree_int2.c,v 1.
9 2009/12/02 13:13:24 teodor
Exp $
*/
#include "btree_gist.h"
#include "btree_utils_num.h"
...
...
@@ -56,13 +56,18 @@ gbt_int2lt(const void *a, const void *b)
static
int
gbt_int2key_cmp
(
const
void
*
a
,
const
void
*
b
)
{
int16KEY
*
ia
=
(
int16KEY
*
)(((
Nsrt
*
)
a
)
->
t
);
int16KEY
*
ib
=
(
int16KEY
*
)(((
Nsrt
*
)
b
)
->
t
);
if
(
*
(
int16
*
)
(
&
((
Nsrt
*
)
a
)
->
t
[
0
])
>
*
(
int16
*
)
&
(((
Nsrt
*
)
b
)
->
t
[
0
]))
return
1
;
else
if
(
*
(
int16
*
)
&
(((
Nsrt
*
)
a
)
->
t
[
0
])
<
*
(
int16
*
)
&
(((
Nsrt
*
)
b
)
->
t
[
0
]))
return
-
1
;
return
0
;
if
(
ia
->
lower
==
ib
->
lower
)
{
if
(
ia
->
upper
==
ib
->
upper
)
return
0
;
return
(
ia
->
upper
>
ib
->
upper
)
?
1
:
-
1
;
}
return
(
ia
->
lower
>
ib
->
lower
)
?
1
:
-
1
;
}
...
...
contrib/btree_gist/btree_int4.c
View file @
aebc4e67
/*
* $PostgreSQL: pgsql/contrib/btree_gist/btree_int4.c,v 1.
8 2009/06/11 14:48:50 momjian
Exp $
* $PostgreSQL: pgsql/contrib/btree_gist/btree_int4.c,v 1.
9 2009/12/02 13:13:24 teodor
Exp $
*/
#include "btree_gist.h"
#include "btree_utils_num.h"
...
...
@@ -57,13 +57,18 @@ gbt_int4lt(const void *a, const void *b)
static
int
gbt_int4key_cmp
(
const
void
*
a
,
const
void
*
b
)
{
int32KEY
*
ia
=
(
int32KEY
*
)(((
Nsrt
*
)
a
)
->
t
);
int32KEY
*
ib
=
(
int32KEY
*
)(((
Nsrt
*
)
b
)
->
t
);
if
(
*
(
int32
*
)
&
(((
Nsrt
*
)
a
)
->
t
[
0
])
>
*
(
int32
*
)
&
(((
Nsrt
*
)
b
)
->
t
[
0
]))
return
1
;
else
if
(
*
(
int32
*
)
&
(((
Nsrt
*
)
a
)
->
t
[
0
])
<
*
(
int32
*
)
&
(((
Nsrt
*
)
b
)
->
t
[
0
]))
return
-
1
;
return
0
;
if
(
ia
->
lower
==
ib
->
lower
)
{
if
(
ia
->
upper
==
ib
->
upper
)
return
0
;
return
(
ia
->
upper
>
ib
->
upper
)
?
1
:
-
1
;
}
return
(
ia
->
lower
>
ib
->
lower
)
?
1
:
-
1
;
}
...
...
contrib/btree_gist/btree_int8.c
View file @
aebc4e67
/*
* $PostgreSQL: pgsql/contrib/btree_gist/btree_int8.c,v 1.
8 2009/06/11 14:48:50 momjian
Exp $
* $PostgreSQL: pgsql/contrib/btree_gist/btree_int8.c,v 1.
9 2009/12/02 13:13:24 teodor
Exp $
*/
#include "btree_gist.h"
#include "btree_utils_num.h"
...
...
@@ -57,13 +57,18 @@ gbt_int8lt(const void *a, const void *b)
static
int
gbt_int8key_cmp
(
const
void
*
a
,
const
void
*
b
)
{
int64KEY
*
ia
=
(
int64KEY
*
)(((
Nsrt
*
)
a
)
->
t
);
int64KEY
*
ib
=
(
int64KEY
*
)(((
Nsrt
*
)
b
)
->
t
);
if
(
*
(
int64
*
)
&
(((
Nsrt
*
)
a
)
->
t
[
0
])
>
*
(
int64
*
)
&
(((
Nsrt
*
)
b
)
->
t
[
0
]))
return
1
;
else
if
(
*
(
int64
*
)
&
(((
Nsrt
*
)
a
)
->
t
[
0
])
<
*
(
int64
*
)
&
(((
Nsrt
*
)
b
)
->
t
[
0
]))
return
-
1
;
return
0
;
if
(
ia
->
lower
==
ib
->
lower
)
{
if
(
ia
->
upper
==
ib
->
upper
)
return
0
;
return
(
ia
->
upper
>
ib
->
upper
)
?
1
:
-
1
;
}
return
(
ia
->
lower
>
ib
->
lower
)
?
1
:
-
1
;
}
...
...
contrib/btree_gist/btree_interval.c
View file @
aebc4e67
/*
* $PostgreSQL: pgsql/contrib/btree_gist/btree_interval.c,v 1.1
2 2009/06/11 14:48:50 momjian
Exp $
* $PostgreSQL: pgsql/contrib/btree_gist/btree_interval.c,v 1.1
3 2009/12/02 13:13:24 teodor
Exp $
*/
#include "btree_gist.h"
#include "btree_utils_num.h"
...
...
@@ -65,12 +65,15 @@ gbt_intvlt(const void *a, const void *b)
static
int
gbt_intvkey_cmp
(
const
void
*
a
,
const
void
*
b
)
{
return
DatumGetInt32
(
DirectFunctionCall2
(
interval_cmp
,
IntervalPGetDatum
(((
Nsrt
*
)
a
)
->
t
),
IntervalPGetDatum
(((
Nsrt
*
)
b
)
->
t
)
)
);
intvKEY
*
ia
=
(
intvKEY
*
)(((
Nsrt
*
)
a
)
->
t
);
intvKEY
*
ib
=
(
intvKEY
*
)(((
Nsrt
*
)
b
)
->
t
);
int
res
;
res
=
DatumGetInt32
(
DirectFunctionCall2
(
interval_cmp
,
IntervalPGetDatum
(
&
ia
->
lower
),
IntervalPGetDatum
(
&
ib
->
lower
)));
if
(
res
==
0
)
return
DatumGetInt32
(
DirectFunctionCall2
(
interval_cmp
,
IntervalPGetDatum
(
&
ia
->
upper
),
IntervalPGetDatum
(
&
ib
->
upper
)));
return
res
;
}
...
...
contrib/btree_gist/btree_macaddr.c
View file @
aebc4e67
/*
* $PostgreSQL: pgsql/contrib/btree_gist/btree_macaddr.c,v 1.
8 2009/06/11 14:48:50 momjian
Exp $
* $PostgreSQL: pgsql/contrib/btree_gist/btree_macaddr.c,v 1.
9 2009/12/02 13:13:24 teodor
Exp $
*/
#include "btree_gist.h"
#include "btree_utils_num.h"
...
...
@@ -63,13 +63,15 @@ gbt_macadlt(const void *a, const void *b)
static
int
gbt_macadkey_cmp
(
const
void
*
a
,
const
void
*
b
)
{
return
DatumGetInt32
(
DirectFunctionCall2
(
macaddr_cmp
,
PointerGetDatum
(
&
((
Nsrt
*
)
a
)
->
t
[
0
]),
PointerGetDatum
(
&
((
Nsrt
*
)
b
)
->
t
[
0
])
)
);
macKEY
*
ia
=
(
macKEY
*
)(((
Nsrt
*
)
a
)
->
t
);
macKEY
*
ib
=
(
macKEY
*
)(((
Nsrt
*
)
b
)
->
t
);
int
res
;
res
=
DatumGetInt32
(
DirectFunctionCall2
(
macaddr_cmp
,
MacaddrPGetDatum
(
&
ia
->
lower
),
MacaddrPGetDatum
(
&
ib
->
lower
)));
if
(
res
==
0
)
return
DatumGetInt32
(
DirectFunctionCall2
(
macaddr_cmp
,
MacaddrPGetDatum
(
&
ia
->
upper
),
MacaddrPGetDatum
(
&
ib
->
upper
)));
return
res
;
}
...
...
contrib/btree_gist/btree_oid.c
View file @
aebc4e67
/*
* $PostgreSQL: pgsql/contrib/btree_gist/btree_oid.c,v 1.
8 2009/06/11 14:48:50 momjian
Exp $
* $PostgreSQL: pgsql/contrib/btree_gist/btree_oid.c,v 1.
9 2009/12/02 13:13:24 teodor
Exp $
*/
#include "btree_gist.h"
#include "btree_utils_num.h"
...
...
@@ -57,13 +57,18 @@ gbt_oidlt(const void *a, const void *b)
static
int
gbt_oidkey_cmp
(
const
void
*
a
,
const
void
*
b
)
{
oidKEY
*
ia
=
(
oidKEY
*
)(((
Nsrt
*
)
a
)
->
t
);
oidKEY
*
ib
=
(
oidKEY
*
)(((
Nsrt
*
)
b
)
->
t
);
if
(
*
(
Oid
*
)
&
(((
Nsrt
*
)
a
)
->
t
[
0
])
>
*
(
Oid
*
)
&
(((
Nsrt
*
)
b
)
->
t
[
0
]))
return
1
;
else
if
(
*
(
Oid
*
)
&
(((
Nsrt
*
)
a
)
->
t
[
0
])
<
*
(
Oid
*
)
&
(((
Nsrt
*
)
b
)
->
t
[
0
]))
return
-
1
;
return
0
;
if
(
ia
->
lower
==
ib
->
lower
)
{
if
(
ia
->
upper
==
ib
->
upper
)
return
0
;
return
(
ia
->
upper
>
ib
->
upper
)
?
1
:
-
1
;
}
return
(
ia
->
lower
>
ib
->
lower
)
?
1
:
-
1
;
}
...
...
contrib/btree_gist/btree_time.c
View file @
aebc4e67
/*
* $PostgreSQL: pgsql/contrib/btree_gist/btree_time.c,v 1.1
6 2009/06/11 14:48:50 momjian
Exp $
* $PostgreSQL: pgsql/contrib/btree_gist/btree_time.c,v 1.1
7 2009/12/02 13:13:24 teodor
Exp $
*/
#include "btree_gist.h"
#include "btree_utils_num.h"
...
...
@@ -101,11 +101,15 @@ gbt_timelt(const void *a, const void *b)
static
int
gbt_timekey_cmp
(
const
void
*
a
,
const
void
*
b
)
{
if
(
gbt_timegt
((
void
*
)
&
(((
Nsrt
*
)
a
)
->
t
[
0
]),
(
void
*
)
&
(((
Nsrt
*
)
b
)
->
t
[
0
])))
return
1
;
else
if
(
gbt_timelt
((
void
*
)
&
(((
Nsrt
*
)
a
)
->
t
[
0
]),
(
void
*
)
&
(((
Nsrt
*
)
b
)
->
t
[
0
])))
return
-
1
;
return
0
;
timeKEY
*
ia
=
(
timeKEY
*
)(((
Nsrt
*
)
a
)
->
t
);
timeKEY
*
ib
=
(
timeKEY
*
)(((
Nsrt
*
)
b
)
->
t
);
int
res
;
res
=
DatumGetInt32
(
DirectFunctionCall2
(
time_cmp
,
TimeADTGetDatumFast
(
ia
->
lower
),
TimeADTGetDatumFast
(
ib
->
lower
)));
if
(
res
==
0
)
return
DatumGetInt32
(
DirectFunctionCall2
(
time_cmp
,
TimeADTGetDatumFast
(
ia
->
upper
),
TimeADTGetDatumFast
(
ib
->
upper
)));
return
res
;
}
...
...
contrib/btree_gist/btree_ts.c
View file @
aebc4e67
/*
* $PostgreSQL: pgsql/contrib/btree_gist/btree_ts.c,v 1.1
7 2009/06/11 14:48:50 momjian
Exp $
* $PostgreSQL: pgsql/contrib/btree_gist/btree_ts.c,v 1.1
8 2009/12/02 13:13:24 teodor
Exp $
*/
#include "btree_gist.h"
#include "btree_utils_num.h"
...
...
@@ -99,11 +99,15 @@ gbt_tslt(const void *a, const void *b)
static
int
gbt_tskey_cmp
(
const
void
*
a
,
const
void
*
b
)
{
if
(
gbt_tsgt
((
void
*
)
&
(((
Nsrt
*
)
a
)
->
t
[
0
]),
(
void
*
)
&
(((
Nsrt
*
)
b
)
->
t
[
0
])))
return
1
;
else
if
(
gbt_tslt
((
void
*
)
&
(((
Nsrt
*
)
a
)
->
t
[
0
]),
(
void
*
)
&
(((
Nsrt
*
)
b
)
->
t
[
0
])))
return
-
1
;
return
0
;
tsKEY
*
ia
=
(
tsKEY
*
)(((
Nsrt
*
)
a
)
->
t
);
tsKEY
*
ib
=
(
tsKEY
*
)(((
Nsrt
*
)
b
)
->
t
);
int
res
;
res
=
DatumGetInt32
(
DirectFunctionCall2
(
timestamp_cmp
,
TimestampGetDatumFast
(
ia
->
lower
),
TimestampGetDatumFast
(
ib
->
lower
)));
if
(
res
==
0
)
return
DatumGetInt32
(
DirectFunctionCall2
(
timestamp_cmp
,
TimestampGetDatumFast
(
ia
->
upper
),
TimestampGetDatumFast
(
ib
->
upper
)));
return
res
;
}
...
...
contrib/btree_gist/btree_utils_var.c
View file @
aebc4e67
/*
* $PostgreSQL: pgsql/contrib/btree_gist/btree_utils_var.c,v 1.2
1 2009/06/11 14:48:50 momjian
Exp $
* $PostgreSQL: pgsql/contrib/btree_gist/btree_utils_var.c,v 1.2
2 2009/12/02 13:13:24 teodor
Exp $
*/
#include "btree_gist.h"
...
...
@@ -444,8 +444,13 @@ gbt_vsrt_cmp(const void *a, const void *b, void *arg)
GBT_VARKEY_R
ar
=
gbt_var_key_readable
(((
const
Vsrt
*
)
a
)
->
t
);
GBT_VARKEY_R
br
=
gbt_var_key_readable
(((
const
Vsrt
*
)
b
)
->
t
);
const
gbtree_vinfo
*
tinfo
=
(
const
gbtree_vinfo
*
)
arg
;
int
res
;
return
(
*
tinfo
->
f_cmp
)
(
ar
.
lower
,
br
.
lower
);
res
=
(
*
tinfo
->
f_cmp
)
(
ar
.
lower
,
br
.
lower
);
if
(
res
==
0
)
return
(
*
tinfo
->
f_cmp
)
(
ar
.
upper
,
br
.
upper
);
return
res
;
}
GIST_SPLITVEC
*
...
...
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