From 261c7d4b653bc3e44c31fd456d94f292caa50d8f Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Wed, 9 Oct 2013 01:09:18 -0400 Subject: Revive line type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change the input/output format to {A,B,C}, to match the internal representation. Complete the implementations of line_in, line_out, line_recv, line_send. Remove comments and error messages about the line type not being implemented. Add regression tests for existing line operators and functions. Reviewed-by: rui hua <365507506hua@gmail.com> Reviewed-by: Álvaro Herrera Reviewed-by: Jeevan Chalke --- src/include/catalog/pg_type.h | 3 +-- src/include/utils/geo_decls.h | 7 ------- 2 files changed, 1 insertion(+), 9 deletions(-) (limited to 'src/include') diff --git a/src/include/catalog/pg_type.h b/src/include/catalog/pg_type.h index e3822faf660..20813125ab2 100644 --- a/src/include/catalog/pg_type.h +++ b/src/include/catalog/pg_type.h @@ -393,10 +393,9 @@ DESCR("geometric polygon '(pt1,...)'"); #define POLYGONOID 604 DATA(insert OID = 628 ( line PGNSP PGUID 32 f b G f t \054 0 701 629 line_in line_out line_recv line_send - - - d p f 0 -1 0 0 _null_ _null_ _null_ )); -DESCR("geometric line (not implemented)"); +DESCR("geometric line"); #define LINEOID 628 DATA(insert OID = 629 ( _line PGNSP PGUID -1 f b A f t \054 0 628 0 array_in array_out array_recv array_send - - array_typanalyze d x f 0 -1 0 0 _null_ _null_ _null_ )); -DESCR(""); /* OIDS 700 - 799 */ diff --git a/src/include/utils/geo_decls.h b/src/include/utils/geo_decls.h index 5c83a71e7aa..1e648c0befc 100644 --- a/src/include/utils/geo_decls.h +++ b/src/include/utils/geo_decls.h @@ -88,19 +88,12 @@ typedef struct /*--------------------------------------------------------------------- * LINE - Specified by its general equation (Ax+By+C=0). - * If there is a y-intercept, it is C, which - * incidentally gives a freebie point on the line - * (if B=0, then C is the x-intercept). - * Slope m is precalculated to save time; if - * the line is not vertical, m == A. *-------------------------------------------------------------------*/ typedef struct { double A, B, C; - - double m; } LINE; -- cgit v1.2.3