18 BrinValues *column = (BrinValues *) PG_GETARG_POINTER(1);
19 Datum newval = PG_GETARG_DATUM(2);
20 bool isnull = PG_GETARG_BOOL(3);
21 BOX2DF box_geom, *box_key;
29 if (column->bv_hasnulls)
30 PG_RETURN_BOOL(
false);
32 column->bv_hasnulls =
true;
53 PG_RETURN_BOOL(
false);
60 elog(ERROR,
"Error while extracting the box2df from the geom");
65 if (column->bv_allnulls)
67 column->bv_values[
INCLUSION_UNION] = datumCopy((Datum) &box_geom,
false,
71 column->bv_allnulls =
false;
79 PG_RETURN_BOOL(
false);
85 box_key->xmin = Min(box_key->xmin, box_geom.xmin);
86 box_key->xmax = Max(box_key->xmax, box_geom.xmax);
87 box_key->ymin = Min(box_key->ymin, box_geom.ymin);
88 box_key->ymax = Max(box_key->ymax, box_geom.ymax);
#define INCLUSION_CONTAINS_EMPTY
PG_FUNCTION_INFO_V1(geom2d_brin_inclusion_add_value)
Datum geom2d_brin_inclusion_add_value(PG_FUNCTION_ARGS)
int gserialized_datum_get_box2df_p(Datum gsdatum, BOX2DF *box2df)
Peak into a GSERIALIZED datum to find the bounding box.
bool box2df_contains(const BOX2DF *a, const BOX2DF *b)
bool is_gserialized_from_datum_empty(Datum the_datum)
#define INCLUSION_UNMERGEABLE