mirror of
https://github.com/postgres/postgres.git
synced 2025-07-05 07:21:24 +03:00
Disable not-ready-to-use support code for the line data type.
Bracket things with #ifdef ENABLE_LINE_TYPE. The line data type has always been used internally to support other types, but I/O routines have never been defined for it.
This commit is contained in:
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_ops.c,v 1.34 1998/08/15 06:45:10 thomas Exp $
|
* $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_ops.c,v 1.35 1998/08/16 04:06:55 thomas Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -768,13 +768,12 @@ box_diagonal(BOX *box)
|
|||||||
**
|
**
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
|
|
||||||
#define LINEDEBUG
|
|
||||||
LINE *
|
LINE *
|
||||||
line_in(char *str)
|
line_in(char *str)
|
||||||
{
|
{
|
||||||
LINE *line;
|
LINE *line;
|
||||||
|
|
||||||
#if LINEDEBUG
|
#ifdef ENABLE_LINE_TYPE
|
||||||
LSEG lseg;
|
LSEG lseg;
|
||||||
int isopen;
|
int isopen;
|
||||||
char *s;
|
char *s;
|
||||||
@ -783,7 +782,7 @@ line_in(char *str)
|
|||||||
if (!PointerIsValid(str))
|
if (!PointerIsValid(str))
|
||||||
elog(ERROR, " Bad (null) line external representation", NULL);
|
elog(ERROR, " Bad (null) line external representation", NULL);
|
||||||
|
|
||||||
#if LINEDEBUG
|
#ifdef ENABLE_LINE_TYPE
|
||||||
if ((!path_decode(TRUE, 2, str, &isopen, &s, &(lseg.p[0])))
|
if ((!path_decode(TRUE, 2, str, &isopen, &s, &(lseg.p[0])))
|
||||||
|| (*s != '\0'))
|
|| (*s != '\0'))
|
||||||
elog(ERROR, "Bad line external representation '%s'", str);
|
elog(ERROR, "Bad line external representation '%s'", str);
|
||||||
@ -802,12 +801,14 @@ char *
|
|||||||
line_out(LINE *line)
|
line_out(LINE *line)
|
||||||
{
|
{
|
||||||
char *result;
|
char *result;
|
||||||
|
#ifdef ENABLE_LINE_TYPE
|
||||||
LSEG lseg;
|
LSEG lseg;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!PointerIsValid(line))
|
if (!PointerIsValid(line))
|
||||||
return (NULL);
|
return (NULL);
|
||||||
|
|
||||||
#if LINEDEBUG
|
#ifdef ENABLE_LINE_TYPE
|
||||||
if (FPzero(line->B))
|
if (FPzero(line->B))
|
||||||
{ /* vertical */
|
{ /* vertical */
|
||||||
/* use "x = C" */
|
/* use "x = C" */
|
||||||
|
Reference in New Issue
Block a user