30 #include "access/hash.h"
31 #include "utils/geo_decls.h"
32 #include "utils/sortsupport.h"
34 #include "../postgis_config.h"
36 #include "lwgeom_pg.h"
56 PG_FREE_IF_COPY(g1, 0);
57 PG_FREE_IF_COPY(g2, 1);
61 PG_RETURN_BOOL(
false);
70 PG_FREE_IF_COPY(g1, 0);
71 PG_FREE_IF_COPY(g2, 1);
75 PG_RETURN_BOOL(
false);
84 PG_FREE_IF_COPY(g1, 0);
85 PG_FREE_IF_COPY(g2, 1);
89 PG_RETURN_BOOL(
false);
98 PG_FREE_IF_COPY(g1, 0);
99 PG_FREE_IF_COPY(g2, 1);
101 PG_RETURN_BOOL(
true);
103 PG_RETURN_BOOL(
false);
112 PG_FREE_IF_COPY(g1, 0);
113 PG_FREE_IF_COPY(g2, 1);
115 PG_RETURN_BOOL(
true);
117 PG_RETURN_BOOL(
false);
126 PG_FREE_IF_COPY(g1, 0);
127 PG_FREE_IF_COPY(g2, 1);
128 PG_RETURN_INT32(ret);
137 PG_FREE_IF_COPY(g1, 0);
138 PG_RETURN_INT32(hval);
145 if (
x == 0 ||
y == 0 ||
x ==
y)
185 SortSupport ssup = (SortSupport)PG_GETARG_POINTER(0);
188 ssup->ssup_extra = NULL;
190 if (ssup->abbreviate &&
sizeof(Datum) == 8)
uint64_t gserialized_get_sortable_hash(const GSERIALIZED *g)
Return a sortable key based on gserialized.
int32_t gserialized_hash(const GSERIALIZED *g)
Returns a hash code for the srid/type/geometry information in the GSERIALIZED.
int gserialized_cmp(const GSERIALIZED *g1, const GSERIALIZED *g2)
Return -1 if g1 is "less than" g2, 1 if g1 is "greater than" g2 and 0 if g1 and g2 are the "same".
This library is the generic geometry handling section of PostGIS.
Datum lwgeom_sortsupport(PG_FUNCTION_ARGS)
Datum lwgeom_lt(PG_FUNCTION_ARGS)
PG_FUNCTION_INFO_V1(lwgeom_lt)
Datum lwgeom_cmp(PG_FUNCTION_ARGS)
Datum lwgeom_ge(PG_FUNCTION_ARGS)
Datum lwgeom_gt(PG_FUNCTION_ARGS)
static bool lwgeom_abbrev_abort(int memtupcount, SortSupport ssup)
static int lwgeom_cmp_abbrev(Datum x, Datum y, SortSupport ssup)
Datum lwgeom_eq(PG_FUNCTION_ARGS)
Datum lwgeom_le(PG_FUNCTION_ARGS)
static Datum lwgeom_abbrev_convert(Datum original, SortSupport ssup)
static int lwgeom_cmp_full(Datum x, Datum y, SortSupport ssup)
Datum lwgeom_hash(PG_FUNCTION_ARGS)
#define POSTGIS_FREE_IF_COPY_P(ptrsrc, ptrori)