mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Fix incorrect function return code in cube_cmp and cube_dim;
update regression expected files to what I think is correct.
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
/******************************************************************************
|
||||
$PostgreSQL: pgsql/contrib/cube/cube.c,v 1.27 2006/07/25 23:23:44 momjian Exp $
|
||||
$PostgreSQL: pgsql/contrib/cube/cube.c,v 1.28 2006/07/27 21:55:09 tgl Exp $
|
||||
|
||||
This file contains routines that can be bound to a Postgres backend and
|
||||
called by the backend in the process of processing queries. The calling
|
||||
@ -14,12 +14,19 @@
|
||||
#include "access/gist.h"
|
||||
#include "access/skey.h"
|
||||
#include "lib/stringinfo.h"
|
||||
#include "utils/array.h"
|
||||
#include "utils/builtins.h"
|
||||
|
||||
#include "cubedata.h"
|
||||
|
||||
PG_MODULE_MAGIC;
|
||||
|
||||
/*
|
||||
* Taken from the intarray contrib header
|
||||
*/
|
||||
#define ARRPTR(x) ( (double *) ARR_DATA_PTR(x) )
|
||||
#define ARRNELEMS(x) ArrayGetNItems( ARR_NDIM(x), ARR_DIMS(x))
|
||||
|
||||
extern int cube_yyparse();
|
||||
extern void cube_yyerror(const char *message);
|
||||
extern void cube_scanner_init(const char *str);
|
||||
@ -179,15 +186,6 @@ cube(PG_FUNCTION_ARGS)
|
||||
}
|
||||
|
||||
|
||||
#include "utils/array.h"
|
||||
|
||||
/*
|
||||
** Taken from the intarray contrib header
|
||||
*/
|
||||
#define ARRPTR(x) ( (double *) ARR_DATA_PTR(x) )
|
||||
#define ARRNELEMS(x) ArrayGetNItems( ARR_NDIM(x), ARR_DIMS(x))
|
||||
|
||||
|
||||
/*
|
||||
** Allows the construction of a cube from 2 float[]'s
|
||||
*/
|
||||
@ -1000,7 +998,7 @@ cube_cmp(PG_FUNCTION_ARGS)
|
||||
a = (NDBOX *) PG_GETARG_POINTER(0);
|
||||
b = (NDBOX *) PG_GETARG_POINTER(1);
|
||||
|
||||
PG_RETURN_INT16(cube_cmp_v0(a, b));
|
||||
PG_RETURN_INT32(cube_cmp_v0(a, b));
|
||||
}
|
||||
|
||||
|
||||
@ -1285,7 +1283,7 @@ cube_dim(PG_FUNCTION_ARGS)
|
||||
|
||||
c = (NDBOX *) PG_GETARG_POINTER(0);
|
||||
|
||||
PG_RETURN_INT16 (c->dim);
|
||||
PG_RETURN_INT32(c->dim);
|
||||
}
|
||||
|
||||
/* Return a specific normalized LL coordinate */
|
||||
|
Reference in New Issue
Block a user