36#include "utils/fmgrprotos.h"
243 else if (*
str !=
'\0')
250 errmsg(
"invalid input syntax for type %s: \"%s\"",
302 for (
i = 0;
i < npts;
i++)
328 else if (*
str !=
'\0')
335 errmsg(
"invalid input syntax for type %s: \"%s\"",
359 for (
i = 0;
i < npts;
i++)
425 Node *escontext = fcinfo->context;
965 while (
isspace((
unsigned char) *s))
974 errmsg(
"invalid input syntax for type %s: \"%s\"",
982 Node *escontext = fcinfo->context;
989 while (
isspace((
unsigned char) *s))
998 errmsg(
"invalid line specification: A and B cannot both be zero")));
1008 errmsg(
"invalid line specification: must be two distinct points")));
1052 errmsg(
"invalid line specification: A and B cannot both be zero")));
1106 if (result->
C == 0.0)
1124 errmsg(
"invalid line specification: must be two distinct points")));
1390 for (
i = 0;
i < path->
npts;
i++)
1392 j = (
i + 1) % path->
npts;
1405 Node *escontext = fcinfo->context;
1417 errmsg(
"invalid input syntax for type %s: \"%s\"",
1421 while (
isspace((
unsigned char) *s))
1438 errmsg(
"too many points requested")));
1454 errmsg(
"invalid input syntax for type %s: \"%s\"",
1456 while (
isspace((
unsigned char) *s))
1462 errmsg(
"invalid input syntax for type %s: \"%s\"",
1502 errmsg(
"invalid number of points in external \"path\" value")));
1509 path->
closed = (closed ? 1 : 0);
1513 for (
i = 0;
i < npts;
i++)
1535 for (
i = 0;
i < path->
npts;
i++)
1666 b1.high.x =
b1.low.x =
p1->p[0].x;
1667 b1.high.y =
b1.low.y =
p1->p[0].y;
1668 for (
i = 1;
i <
p1->npts;
i++)
1675 b2.high.x =
b2.low.x =
p2->p[0].x;
1676 b2.high.y =
b2.low.y =
p2->p[0].y;
1677 for (
i = 1;
i <
p2->npts;
i++)
1688 for (
i = 0;
i <
p1->npts;
i++)
1701 for (
j = 0;
j <
p2->npts;
j++)
1742 for (
i = 0;
i <
p1->npts;
i++)
1755 for (
j = 0;
j <
p2->npts;
j++)
1798 for (
i = 0;
i < path->
npts;
i++)
2068 Node *escontext = fcinfo->context;
2449 for (
i = 0;
i < path->
npts;
i++)
2641 seg.
p[0].
x =
poly->p[0].x;
2642 seg.
p[0].
y =
poly->p[0].y;
2648 for (
i = 0;
i <
poly->npts - 1;
i++)
2652 seg.
p[1].
x =
poly->p[
i + 1].x;
2653 seg.
p[1].
y =
poly->p[
i + 1].y;
2703 *result =
lseg->p[0];
2705 *result =
lseg->p[1];
2974 *result =
lseg->p[0];
2981 *result =
lseg->p[1];
3180 for (
i = 0;
i < n;
i++)
3388 for (
i = 1;
i <
poly->npts;
i++)
3400 poly->boundbox.low.x =
x1;
3401 poly->boundbox.high.x =
x2;
3402 poly->boundbox.low.y =
y1;
3403 poly->boundbox.high.y =
y2;
3418 Node *escontext = fcinfo->context;
3428 errmsg(
"invalid input syntax for type %s: \"%s\"",
3438 errmsg(
"too many points requested")));
3487 errmsg(
"invalid number of points in external \"polygon\" value")));
3495 for (
i = 0;
i < npts;
i++)
3518 for (
i = 0;
i <
poly->npts;
i++)
3539 result =
polya->boundbox.high.x <
polyb->boundbox.low.x;
3562 result =
polya->boundbox.high.x <=
polyb->boundbox.high.x;
3585 result =
polya->boundbox.low.x >
polyb->boundbox.high.x;
3608 result =
polya->boundbox.low.x >=
polyb->boundbox.low.x;
3631 result =
polya->boundbox.high.y <
polyb->boundbox.low.y;
3654 result =
polya->boundbox.high.y <=
polyb->boundbox.high.y;
3677 result =
polya->boundbox.low.y >
polyb->boundbox.high.y;
3700 result =
polya->boundbox.low.y >=
polyb->boundbox.low.y;
4309 box->high.x =
pt->x;
4311 box->high.y =
pt->y;
4357 if (
p1->closed ||
p2->closed)
4368 errmsg(
"too many points requested")));
4373 result->
npts = (
p1->npts +
p2->npts);
4378 for (
i = 0;
i <
p1->npts;
i++)
4380 result->
p[
i].
x =
p1->p[
i].x;
4381 result->
p[
i].
y =
p1->p[
i].y;
4383 for (
i = 0;
i <
p2->npts;
i++)
4385 result->
p[
i +
p1->npts].
x =
p2->p[
i].x;
4386 result->
p[
i +
p1->npts].
y =
p2->p[
i].y;
4402 for (
i = 0;
i < path->
npts;
i++)
4415 for (
i = 0;
i < path->
npts;
i++)
4431 for (
i = 0;
i < path->
npts;
i++)
4444 for (
i = 0;
i < path->
npts;
i++)
4463 errmsg(
"open path cannot be converted to polygon")));
4475 for (
i = 0;
i < path->
npts;
i++)
4584 for (
i = 0;
i <
poly->npts;
i++)
4614 Node *escontext = fcinfo->context;
4621 while (
isspace((
unsigned char) *s))
4647 if (
circle->radius < 0.0)
4650 errmsg(
"invalid input syntax for type %s: \"%s\"",
4659 while (
isspace((
unsigned char) *s))
4665 errmsg(
"invalid input syntax for type %s: \"%s\"",
4672 errmsg(
"invalid input syntax for type %s: \"%s\"",
4715 if (
circle->radius < 0.0)
4718 errmsg(
"invalid radius in external \"circle\" value")));
5239 errmsg(
"cannot convert circle with radius zero to polygon")));
5244 errmsg(
"must request at least 2 points")));
5253 errmsg(
"too many points requested")));
5261 for (
i = 0;
i < npts;
i++)
5295 for (
i = 0;
i <
poly->npts;
i++)
5300 for (
i = 0;
i <
poly->npts;
i++)
5337#define POINT_ON_POLYGON INT_MAX
5361 for (
i = 1;
i < npts;
i++)
5406 else if (
FPgt(
x, 0))
5464 for (
i = 0;
i < npts;
i++)
5470 for (ii = 1,
j =
i + 1; ii < npts; ii++,
j++)
5481 for (ii = 1,
j =
i - 1; ii < npts; ii++,
j--)
#define Assert(condition)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereturn(context, dummy_value,...)
#define ereport(elevel,...)
#define palloc_object(type)
float8 float8in_internal(char *num, char **endptr_p, const char *type_name, const char *orig_string, struct Node *escontext)
char * float8out_internal(double num)
static float8 float8_min(const float8 val1, const float8 val2)
static float8 float8_mul(const float8 val1, const float8 val2)
static float8 float8_pl(const float8 val1, const float8 val2)
static float8 float8_mi(const float8 val1, const float8 val2)
static float8 get_float8_infinity(void)
static float8 float8_max(const float8 val1, const float8 val2)
static bool float8_eq(const float8 val1, const float8 val2)
static float8 get_float8_nan(void)
static float8 float8_div(const float8 val1, const float8 val2)
static bool float8_lt(const float8 val1, const float8 val2)
static bool float8_gt(const float8 val1, const float8 val2)
#define PG_FREE_IF_COPY(ptr, n)
#define PG_RETURN_BYTEA_P(x)
#define PG_GETARG_FLOAT8(n)
#define PG_RETURN_FLOAT8(x)
#define PG_GETARG_POINTER(n)
#define PG_RETURN_CSTRING(x)
#define PG_GETARG_CSTRING(n)
#define PG_RETURN_INT32(x)
#define PG_GETARG_INT32(n)
#define PG_RETURN_BOOL(x)
static bool FPlt(double A, double B)
#define PG_GETARG_POINT_P(n)
#define PG_RETURN_CIRCLE_P(x)
static bool FPge(double A, double B)
#define PG_RETURN_BOX_P(x)
#define PG_RETURN_LSEG_P(x)
#define PG_RETURN_POINT_P(x)
#define PG_GETARG_LINE_P(n)
static bool FPne(double A, double B)
#define PG_RETURN_POLYGON_P(x)
#define PG_GETARG_BOX_P(n)
#define PG_GETARG_POLYGON_P(n)
#define PG_GETARG_PATH_P_COPY(n)
#define PG_GETARG_CIRCLE_P(n)
static bool FPgt(double A, double B)
static bool FPle(double A, double B)
#define PG_GETARG_LSEG_P(n)
#define PG_RETURN_LINE_P(x)
#define PG_GETARG_PATH_P(n)
static bool FPeq(double A, double B)
#define PG_RETURN_PATH_P(x)
static void poly_to_circle(CIRCLE *result, POLYGON *poly)
Datum circle_div_pt(PG_FUNCTION_ARGS)
static bool pair_decode(char *str, float8 *x, float8 *y, char **endptr_p, const char *type_name, const char *orig_string, Node *escontext)
Datum circle_contained(PG_FUNCTION_ARGS)
Datum close_ls(PG_FUNCTION_ARGS)
static bool box_ov(BOX *box1, BOX *box2)
static float8 box_closept_point(Point *result, BOX *box, Point *pt)
Datum box_width(PG_FUNCTION_ARGS)
Datum path_n_le(PG_FUNCTION_ARGS)
Datum lseg_center(PG_FUNCTION_ARGS)
Datum path_close(PG_FUNCTION_ARGS)
Datum circle_in(PG_FUNCTION_ARGS)
Datum point_distance(PG_FUNCTION_ARGS)
static int lseg_crossing(float8 x, float8 y, float8 prev_x, float8 prev_y)
Datum circle_eq(PG_FUNCTION_ARGS)
Datum path_distance(PG_FUNCTION_ARGS)
static bool box_interpt_lseg(Point *result, BOX *box, LSEG *lseg)
static bool lseg_inside_poly(Point *a, Point *b, POLYGON *poly, int start)
static bool lseg_contain_point(LSEG *lseg, Point *pt)
Datum lseg_send(PG_FUNCTION_ARGS)
Datum box_left(PG_FUNCTION_ARGS)
static bool single_decode(char *num, float8 *x, char **endptr_p, const char *type_name, const char *orig_string, Node *escontext)
Datum point_ne(PG_FUNCTION_ARGS)
Datum path_n_eq(PG_FUNCTION_ARGS)
Datum point_out(PG_FUNCTION_ARGS)
Datum circle_overright(PG_FUNCTION_ARGS)
Datum circle_radius(PG_FUNCTION_ARGS)
Datum cr_circle(PG_FUNCTION_ARGS)
static char * path_encode(enum path_delim path_delim, int npts, Point *pt)
Datum point_send(PG_FUNCTION_ARGS)
Datum circle_distance(PG_FUNCTION_ARGS)
Datum circle_center(PG_FUNCTION_ARGS)
Datum box_gt(PG_FUNCTION_ARGS)
Datum circle_right(PG_FUNCTION_ARGS)
Datum circle_overleft(PG_FUNCTION_ARGS)
Datum path_mul_pt(PG_FUNCTION_ARGS)
Datum box_right(PG_FUNCTION_ARGS)
static float8 box_ht(BOX *box)
Datum dist_pathp(PG_FUNCTION_ARGS)
Datum circle_diameter(PG_FUNCTION_ARGS)
static bool poly_contain_poly(POLYGON *contains_poly, POLYGON *contained_poly)
Datum lseg_out(PG_FUNCTION_ARGS)
Datum path_n_ge(PG_FUNCTION_ARGS)
Datum box_ge(PG_FUNCTION_ARGS)
Datum poly_in(PG_FUNCTION_ARGS)
Datum dist_pc(PG_FUNCTION_ARGS)
Datum point_sub(PG_FUNCTION_ARGS)
Datum poly_npoints(PG_FUNCTION_ARGS)
Datum dist_ps(PG_FUNCTION_ARGS)
Datum poly_overabove(PG_FUNCTION_ARGS)
static void statlseg_construct(LSEG *lseg, Point *pt1, Point *pt2)
Datum on_pl(PG_FUNCTION_ARGS)
Datum path_isopen(PG_FUNCTION_ARGS)
Datum path_sub_pt(PG_FUNCTION_ARGS)
Datum circle_same(PG_FUNCTION_ARGS)
Datum point_div(PG_FUNCTION_ARGS)
Datum line_vertical(PG_FUNCTION_ARGS)
Datum box_same(PG_FUNCTION_ARGS)
Datum line_in(PG_FUNCTION_ARGS)
Datum circle_box(PG_FUNCTION_ARGS)
static void point_construct(Point *result, float8 x, float8 y)
Datum circle_ge(PG_FUNCTION_ARGS)
Datum poly_contain_pt(PG_FUNCTION_ARGS)
Datum dist_ppoly(PG_FUNCTION_ARGS)
Datum poly_out(PG_FUNCTION_ARGS)
Datum poly_distance(PG_FUNCTION_ARGS)
Datum line_distance(PG_FUNCTION_ARGS)
Datum circle_mul_pt(PG_FUNCTION_ARGS)
Datum point_eq(PG_FUNCTION_ARGS)
static bool box_contain_box(BOX *contains_box, BOX *contained_box)
Datum dist_ppath(PG_FUNCTION_ARGS)
Datum point_box(PG_FUNCTION_ARGS)
static void line_construct(LINE *result, Point *pt, float8 m)
Datum box_sub(PG_FUNCTION_ARGS)
Datum circle_overabove(PG_FUNCTION_ARGS)
Datum poly_overright(PG_FUNCTION_ARGS)
Datum point_above(PG_FUNCTION_ARGS)
Datum dist_cpoly(PG_FUNCTION_ARGS)
Datum line_perp(PG_FUNCTION_ARGS)
Datum path_in(PG_FUNCTION_ARGS)
Datum dist_pl(PG_FUNCTION_ARGS)
static void point_add_point(Point *result, Point *pt1, Point *pt2)
Datum lseg_eq(PG_FUNCTION_ARGS)
Datum poly_contained(PG_FUNCTION_ARGS)
Datum poly_circle(PG_FUNCTION_ARGS)
Datum box_distance(PG_FUNCTION_ARGS)
Datum close_lseg(PG_FUNCTION_ARGS)
Datum path_area(PG_FUNCTION_ARGS)
Datum points_box(PG_FUNCTION_ARGS)
Datum box_below(PG_FUNCTION_ARGS)
static void make_bound_box(POLYGON *poly)
Datum poly_overleft(PG_FUNCTION_ARGS)
static bool line_decode(char *s, const char *str, LINE *line, Node *escontext)
Datum poly_path(PG_FUNCTION_ARGS)
static float8 box_closept_lseg(Point *result, BOX *box, LSEG *lseg)
static void point_mul_point(Point *result, Point *pt1, Point *pt2)
Datum circle_above(PG_FUNCTION_ARGS)
Datum dist_sp(PG_FUNCTION_ARGS)
Datum poly_overlap(PG_FUNCTION_ARGS)
Datum lseg_ge(PG_FUNCTION_ARGS)
Datum poly_left(PG_FUNCTION_ARGS)
Datum line_construct_pp(PG_FUNCTION_ARGS)
static bool poly_overlap_internal(POLYGON *polya, POLYGON *polyb)
static float8 circle_ar(CIRCLE *circle)
Datum path_open(PG_FUNCTION_ARGS)
Datum box_add(PG_FUNCTION_ARGS)
Datum box_diagonal(PG_FUNCTION_ARGS)
Datum line_eq(PG_FUNCTION_ARGS)
Datum box_below_eq(PG_FUNCTION_ARGS)
static void box_cn(Point *center, BOX *box)
Datum path_send(PG_FUNCTION_ARGS)
Datum poly_contain(PG_FUNCTION_ARGS)
Datum circle_add_pt(PG_FUNCTION_ARGS)
static void point_div_point(Point *result, Point *pt1, Point *pt2)
static float8 box_ar(BOX *box)
Datum poly_recv(PG_FUNCTION_ARGS)
Datum inter_lb(PG_FUNCTION_ARGS)
Datum box_area(PG_FUNCTION_ARGS)
Datum path_length(PG_FUNCTION_ARGS)
Datum boxes_bound_box(PG_FUNCTION_ARGS)
Datum box_out(PG_FUNCTION_ARGS)
Datum circle_below(PG_FUNCTION_ARGS)
Datum lseg_gt(PG_FUNCTION_ARGS)
static float8 lseg_closept_point(Point *result, LSEG *lseg, Point *pt)
Datum path_out(PG_FUNCTION_ARGS)
Datum box_in(PG_FUNCTION_ARGS)
Datum box_recv(PG_FUNCTION_ARGS)
static float8 lseg_closept_line(Point *result, LSEG *lseg, LINE *line)
Datum on_ppath(PG_FUNCTION_ARGS)
Datum pt_contained_circle(PG_FUNCTION_ARGS)
Datum lseg_recv(PG_FUNCTION_ARGS)
Datum line_send(PG_FUNCTION_ARGS)
Datum lseg_horizontal(PG_FUNCTION_ARGS)
Datum close_pl(PG_FUNCTION_ARGS)
static float8 line_closept_point(Point *result, LINE *line, Point *point)
Datum box_above_eq(PG_FUNCTION_ARGS)
Datum on_ps(PG_FUNCTION_ARGS)
Datum box_contain_pt(PG_FUNCTION_ARGS)
Datum dist_sl(PG_FUNCTION_ARGS)
Datum path_poly(PG_FUNCTION_ARGS)
Datum point_below(PG_FUNCTION_ARGS)
Datum box_le(PG_FUNCTION_ARGS)
Datum line_parallel(PG_FUNCTION_ARGS)
Datum lseg_length(PG_FUNCTION_ARGS)
Datum line_out(PG_FUNCTION_ARGS)
Datum line_interpt(PG_FUNCTION_ARGS)
Datum close_sb(PG_FUNCTION_ARGS)
Datum lseg_le(PG_FUNCTION_ARGS)
Datum on_pb(PG_FUNCTION_ARGS)
static int point_inside(Point *p, int npts, Point *plist)
Datum lseg_ne(PG_FUNCTION_ARGS)
Datum path_inter(PG_FUNCTION_ARGS)
Datum dist_lp(PG_FUNCTION_ARGS)
Datum box_poly(PG_FUNCTION_ARGS)
Datum inter_sb(PG_FUNCTION_ARGS)
Datum poly_below(PG_FUNCTION_ARGS)
Datum poly_overbelow(PG_FUNCTION_ARGS)
Datum pt_contained_poly(PG_FUNCTION_ARGS)
Datum circle_contain(PG_FUNCTION_ARGS)
static bool line_interpt_line(Point *result, LINE *l1, LINE *l2)
static void box_construct(BOX *result, Point *pt1, Point *pt2)
Datum lseg_lt(PG_FUNCTION_ARGS)
Datum circle_send(PG_FUNCTION_ARGS)
static bool box_contain_lseg(BOX *box, LSEG *lseg)
Datum circle_lt(PG_FUNCTION_ARGS)
Datum lseg_vertical(PG_FUNCTION_ARGS)
Datum lseg_construct(PG_FUNCTION_ARGS)
Datum lseg_intersect(PG_FUNCTION_ARGS)
Datum dist_bp(PG_FUNCTION_ARGS)
Datum box_div(PG_FUNCTION_ARGS)
Datum path_n_lt(PG_FUNCTION_ARGS)
Datum box_overright(PG_FUNCTION_ARGS)
Datum path_npoints(PG_FUNCTION_ARGS)
static float8 point_dt(Point *pt1, Point *pt2)
Datum on_sl(PG_FUNCTION_ARGS)
Datum point_horiz(PG_FUNCTION_ARGS)
Datum circle_out(PG_FUNCTION_ARGS)
Datum inter_sl(PG_FUNCTION_ARGS)
static bool path_decode(char *str, bool opentype, int npts, Point *p, bool *isopen, char **endptr_p, const char *type_name, const char *orig_string, Node *escontext)
Datum lseg_parallel(PG_FUNCTION_ARGS)
static bool plist_same(int npts, Point *p1, Point *p2)
static bool touched_lseg_inside_poly(Point *a, Point *b, LSEG *s, POLYGON *poly, int start)
Datum box_overabove(PG_FUNCTION_ARGS)
Datum poly_above(PG_FUNCTION_ARGS)
Datum line_recv(PG_FUNCTION_ARGS)
Datum lseg_interpt(PG_FUNCTION_ARGS)
Datum point_recv(PG_FUNCTION_ARGS)
Datum box_circle(PG_FUNCTION_ARGS)
Datum path_isclosed(PG_FUNCTION_ARGS)
Datum circle_sub_pt(PG_FUNCTION_ARGS)
Datum line_horizontal(PG_FUNCTION_ARGS)
Datum box_mul(PG_FUNCTION_ARGS)
Datum box_overlap(PG_FUNCTION_ARGS)
Datum box_center(PG_FUNCTION_ARGS)
Datum circle_overbelow(PG_FUNCTION_ARGS)
static float8 dist_ppoly_internal(Point *pt, POLYGON *poly)
Datum box_contain(PG_FUNCTION_ARGS)
Datum box_height(PG_FUNCTION_ARGS)
Datum circle_contain_pt(PG_FUNCTION_ARGS)
Datum dist_bs(PG_FUNCTION_ARGS)
Datum path_add_pt(PG_FUNCTION_ARGS)
static float8 box_wd(BOX *box)
static bool box_contain_point(BOX *box, Point *point)
Datum circle_ne(PG_FUNCTION_ARGS)
Datum circle_le(PG_FUNCTION_ARGS)
Datum box_intersect(PG_FUNCTION_ARGS)
Datum close_pb(PG_FUNCTION_ARGS)
Datum circle_left(PG_FUNCTION_ARGS)
static float8 point_sl(Point *pt1, Point *pt2)
static float8 lseg_invsl(LSEG *lseg)
Datum point_left(PG_FUNCTION_ARGS)
Datum path_add(PG_FUNCTION_ARGS)
static bool line_contain_point(LINE *line, Point *point)
Datum circle_overlap(PG_FUNCTION_ARGS)
Datum lseg_in(PG_FUNCTION_ARGS)
Datum circle_area(PG_FUNCTION_ARGS)
Datum on_sb(PG_FUNCTION_ARGS)
Datum dist_pb(PG_FUNCTION_ARGS)
Datum point_add(PG_FUNCTION_ARGS)
static float8 lseg_sl(LSEG *lseg)
Datum circle_recv(PG_FUNCTION_ARGS)
Datum poly_right(PG_FUNCTION_ARGS)
Datum box_lt(PG_FUNCTION_ARGS)
Datum path_recv(PG_FUNCTION_ARGS)
static float8 dist_cpoly_internal(CIRCLE *circle, POLYGON *poly)
static float8 line_sl(LINE *line)
Datum line_intersect(PG_FUNCTION_ARGS)
Datum box_eq(PG_FUNCTION_ARGS)
Datum path_n_gt(PG_FUNCTION_ARGS)
Datum poly_box(PG_FUNCTION_ARGS)
Datum point_slope(PG_FUNCTION_ARGS)
Datum circle_poly(PG_FUNCTION_ARGS)
static int pair_count(char *s, char delim)
static bool lseg_interpt_lseg(Point *result, LSEG *l1, LSEG *l2)
Datum point_right(PG_FUNCTION_ARGS)
Datum box_send(PG_FUNCTION_ARGS)
static float8 point_invsl(Point *pt1, Point *pt2)
Datum point_mul(PG_FUNCTION_ARGS)
static float8 dist_ppath_internal(Point *pt, PATH *path)
static void pair_encode(float8 x, float8 y, StringInfo str)
Datum dist_polyc(PG_FUNCTION_ARGS)
Datum dist_sb(PG_FUNCTION_ARGS)
static float8 line_invsl(LINE *line)
static void point_sub_point(Point *result, Point *pt1, Point *pt2)
Datum circle_gt(PG_FUNCTION_ARGS)
Datum box_overbelow(PG_FUNCTION_ARGS)
static float8 lseg_closept_lseg(Point *result, LSEG *on_lseg, LSEG *to_lseg)
Datum dist_cpoint(PG_FUNCTION_ARGS)
Datum lseg_distance(PG_FUNCTION_ARGS)
Datum dist_ls(PG_FUNCTION_ARGS)
Datum construct_point(PG_FUNCTION_ARGS)
Datum poly_center(PG_FUNCTION_ARGS)
Datum lseg_perp(PG_FUNCTION_ARGS)
Datum box_contained(PG_FUNCTION_ARGS)
Datum path_div_pt(PG_FUNCTION_ARGS)
static bool lseg_interpt_line(Point *result, LSEG *lseg, LINE *line)
Datum point_in(PG_FUNCTION_ARGS)
Datum box_overleft(PG_FUNCTION_ARGS)
static bool point_eq_point(Point *pt1, Point *pt2)
Datum close_ps(PG_FUNCTION_ARGS)
Datum dist_polyp(PG_FUNCTION_ARGS)
Datum box_above(PG_FUNCTION_ARGS)
Datum poly_same(PG_FUNCTION_ARGS)
static void single_encode(float8 x, StringInfo str)
Datum point_vert(PG_FUNCTION_ARGS)
Datum poly_send(PG_FUNCTION_ARGS)
void pfree(void *pointer)
void * palloc0(Size size)
#define CHECK_FOR_INTERRUPTS()
#define SOFT_ERROR_OCCURRED(escontext)
static char buf[DEFAULT_XLOG_SEG_SIZE]
char * psprintf(const char *fmt,...)
void check_stack_depth(void)
struct StringInfoData * StringInfo
void appendStringInfo(StringInfo str, const char *fmt,...)
void appendStringInfoString(StringInfo str, const char *s)
void appendStringInfoChar(StringInfo str, char ch)
void initStringInfo(StringInfo str)
Point p[FLEXIBLE_ARRAY_MEMBER]
static void SET_VARSIZE(void *PTR, Size len)