Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4bd4a55

Browse files
author
Thomas G. Lockhart
committed
Add upgradepath(), isoldpath(), upgradepoly() and revertpoly() to allow
upgrading from existing pre-v6.1 path and polygon geometric data types.
1 parent3887d41 commit4bd4a55

File tree

2 files changed

+19
-5
lines changed

2 files changed

+19
-5
lines changed

‎src/include/catalog/pg_proc.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Id: pg_proc.h,v 1.22 1997/05/14 04:34:19 thomas Exp $
9+
* $Id: pg_proc.h,v 1.23 1997/06/03 14:11:28 thomas Exp $
1010
*
1111
* NOTES
1212
* 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
666666
DATA(insertOID=928 (oidint4cmpPGUID11ftf2f23"910 910"10000100foobar));
667667
DATA(insertOID=929 (mkoidint4PGUID11ftf2f910"26 23"10000100foobar));
668668

669+
/* isoldpath, upgradepath, upgradepoly, revertpoly are used to update pre-v6.1 to v6.1 - tgl 97/06/03 */
670+
DATA(insertOID=936 (isoldpathPGUID11ftf1f16"602"10000100foobar ));
671+
DATA(insertOID=937 (upgradepathPGUID11ftf1f602"602"10000100foobar ));
672+
DATA(insertOID=938 (upgradepolyPGUID11ftf1f604"604"10000100foobar ));
673+
DATA(insertOID=939 (revertpolyPGUID11ftf1f604"604"10000100foobar ));
674+
669675
DATA(insertOID=940 (oidnameinPGUID11ftf1f911"0"10000100foobar));
670676
DATA(insertOID=941 (oidnameoutPGUID11ftf1f19"0"10000100foobar));
671677
DATA(insertOID=942 (oidnameltPGUID11ftf2f16"911 911"10000100foobar));

‎src/include/utils/geo_decls.h

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* Copyright (c) 1994, Regents of the University of California
77
*
8-
* $Id: geo_decls.h,v 1.4 1997/05/06 07:24:42 thomas Exp $
8+
* $Id: geo_decls.h,v 1.5 1997/06/03 14:10:32 thomas Exp $
99
*
1010
* NOTE
1111
* These routines do *not* use the float types from adt/.
@@ -196,9 +196,6 @@ extern bool path_inter(PATH *p1, PATH *p2);
196196
externdouble*path_distance(PATH*p1,PATH*p2);
197197
externdouble*path_length(PATH*path);
198198

199-
/* private routines */
200-
externdoublepath_ln(PATH*path);
201-
202199
externboolpath_isclosed(PATH*path);
203200
externboolpath_isopen(PATH*path);
204201
externint4path_npoints(PATH*path);
@@ -212,7 +209,13 @@ extern PATH *path_mul_pt(PATH *path, Point *point);
212209
externPATH*path_div_pt(PATH*path,Point*point);
213210

214211
externPOLYGON*path_poly(PATH*path);
212+
externPATH*upgradepath(PATH*path);
213+
externboolisoldpath(PATH*path);
214+
215+
/* private routines */
216+
externdoublepath_ln(PATH*path);
215217

218+
/* public point routines */
216219
externPoint*point_in(char*str);
217220
externchar*point_out(Point*pt);
218221
externPoint*point_construct(doublex,doubley);
@@ -238,6 +241,7 @@ extern Point *point_sub(Point *p1, Point *p2);
238241
externPoint*point_mul(Point*p1,Point*p2);
239242
externPoint*point_div(Point*p1,Point*p2);
240243

244+
/* public lseg routines */
241245
externLSEG*lseg_in(char*str);
242246
externchar*lseg_out(LSEG*ls);
243247
externboollseg_intersect(LSEG*l1,LSEG*l2);
@@ -278,6 +282,7 @@ extern void statlseg_construct(LSEG *lseg, Point *pt1, Point *pt2);
278282
externdoublelseg_dt(LSEG*l1,LSEG*l2);
279283
externvoidmake_bound_box(POLYGON*poly);
280284

285+
/* public polygon routines */
281286
externPOLYGON*poly_in(char*s);
282287
externchar*poly_out(POLYGON*poly);
283288
externboolpoly_left(POLYGON*polya,POLYGON*polyb);
@@ -293,7 +298,10 @@ extern int4 poly_npoints(POLYGON *poly);
293298
externBOX*poly_box(POLYGON*poly);
294299
externPATH*poly_path(POLYGON*poly);
295300
externPOLYGON*box_poly(BOX*box);
301+
externPOLYGON*upgradepoly(POLYGON*poly);
302+
externPOLYGON*revertpoly(POLYGON*poly);
296303

304+
/* public circle routines */
297305
externCIRCLE*circle_in(char*str);
298306
externchar*circle_out(CIRCLE*circle);
299307
externboolcircle_same(CIRCLE*circle1,CIRCLE*circle2);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp