From 4bd4a55b98c88284bb4d814c19202e23afbf24cc Mon Sep 17 00:00:00 2001 From: "Thomas G. Lockhart" Date: Tue, 3 Jun 1997 14:11:28 +0000 Subject: [PATCH] Add upgradepath(), isoldpath(), upgradepoly() and revertpoly() to allow upgrading from existing pre-v6.1 path and polygon geometric data types. --- src/include/catalog/pg_proc.h | 8 +++++++- src/include/utils/geo_decls.h | 16 ++++++++++++---- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/src/include/catalog/pg_proc.h b/src/include/catalog/pg_proc.h index d2d12a2d93..510b9da28f 100644 --- a/src/include/catalog/pg_proc.h +++ b/src/include/catalog/pg_proc.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: pg_proc.h,v 1.22 1997/05/14 04:34:19 thomas Exp $ + * $Id: pg_proc.h,v 1.23 1997/06/03 14:11:28 thomas Exp $ * * NOTES * The script catalog/genbki.sh reads this file and generates .bki @@ -666,6 +666,12 @@ DATA(insert OID = 927 ( oidint4ne PGUID 11 f t f 2 f 16 "910 910" 100 0 0 10 DATA(insert OID = 928 ( oidint4cmp PGUID 11 f t f 2 f 23 "910 910" 100 0 0 100 foo bar)); DATA(insert OID = 929 ( mkoidint4 PGUID 11 f t f 2 f 910 "26 23" 100 0 0 100 foo bar)); +/* isoldpath, upgradepath, upgradepoly, revertpoly are used to update pre-v6.1 to v6.1 - tgl 97/06/03 */ +DATA(insert OID = 936 ( isoldpath PGUID 11 f t f 1 f 16 "602" 100 0 0 100 foo bar )); +DATA(insert OID = 937 ( upgradepath PGUID 11 f t f 1 f 602 "602" 100 0 0 100 foo bar )); +DATA(insert OID = 938 ( upgradepoly PGUID 11 f t f 1 f 604 "604" 100 0 0 100 foo bar )); +DATA(insert OID = 939 ( revertpoly PGUID 11 f t f 1 f 604 "604" 100 0 0 100 foo bar )); + DATA(insert OID = 940 ( oidnamein PGUID 11 f t f 1 f 911 "0" 100 0 0 100 foo bar)); DATA(insert OID = 941 ( oidnameout PGUID 11 f t f 1 f 19 "0" 100 0 0 100 foo bar)); DATA(insert OID = 942 ( oidnamelt PGUID 11 f t f 2 f 16 "911 911" 100 0 0 100 foo bar)); diff --git a/src/include/utils/geo_decls.h b/src/include/utils/geo_decls.h index 03638eb8dd..2109f39e25 100644 --- a/src/include/utils/geo_decls.h +++ b/src/include/utils/geo_decls.h @@ -5,7 +5,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: geo_decls.h,v 1.4 1997/05/06 07:24:42 thomas Exp $ + * $Id: geo_decls.h,v 1.5 1997/06/03 14:10:32 thomas Exp $ * * NOTE * These routines do *not* use the float types from adt/. @@ -196,9 +196,6 @@ extern bool path_inter(PATH *p1, PATH *p2); extern double *path_distance(PATH *p1, PATH *p2); extern double *path_length(PATH *path); -/* private routines */ -extern double path_ln(PATH *path); - extern bool path_isclosed(PATH *path); extern bool path_isopen(PATH *path); extern int4 path_npoints(PATH *path); @@ -212,7 +209,13 @@ extern PATH *path_mul_pt(PATH *path, Point *point); extern PATH *path_div_pt(PATH *path, Point *point); extern POLYGON *path_poly(PATH *path); +extern PATH *upgradepath(PATH *path); +extern bool isoldpath(PATH *path); + +/* private routines */ +extern double path_ln(PATH *path); +/* public point routines */ extern Point *point_in(char *str); extern char *point_out(Point *pt); extern Point *point_construct(double x, double y); @@ -238,6 +241,7 @@ extern Point *point_sub(Point *p1, Point *p2); extern Point *point_mul(Point *p1, Point *p2); extern Point *point_div(Point *p1, Point *p2); +/* public lseg routines */ extern LSEG *lseg_in(char *str); extern char *lseg_out(LSEG *ls); extern bool lseg_intersect(LSEG *l1, LSEG *l2); @@ -278,6 +282,7 @@ extern void statlseg_construct(LSEG *lseg, Point *pt1, Point *pt2); extern double lseg_dt(LSEG *l1, LSEG *l2); extern void make_bound_box(POLYGON *poly); +/* public polygon routines */ extern POLYGON *poly_in(char *s); extern char *poly_out(POLYGON *poly); extern bool poly_left(POLYGON *polya, POLYGON *polyb); @@ -293,7 +298,10 @@ extern int4 poly_npoints(POLYGON *poly); extern BOX *poly_box(POLYGON *poly); extern PATH *poly_path(POLYGON *poly); extern POLYGON *box_poly(BOX *box); +extern POLYGON *upgradepoly(POLYGON *poly); +extern POLYGON *revertpoly(POLYGON *poly); +/* public circle routines */ extern CIRCLE *circle_in(char *str); extern char *circle_out(CIRCLE *circle); extern bool circle_same(CIRCLE *circle1, CIRCLE *circle2); -- 2.40.0