//#define PGIS_DEBUG
+#if USE_VERSION == 72
+#define BTREE_SRID_MISMATCH_SEVERITY NOTICE
+#else
+#if USE_VERSION < 80
+#define BTREE_SRID_MISMATCH_SEVERITY WARNING
+#else
+#define BTREE_SRID_MISMATCH_SEVERITY ERROR
+#endif
+#endif
+
PG_FUNCTION_INFO_V1(lwgeom_lt);
Datum lwgeom_lt(PG_FUNCTION_ARGS)
{
if (pglwgeom_getSRID(geom1) != pglwgeom_getSRID(geom2))
{
- elog(ERROR,
+ elog(BTREE_SRID_MISMATCH_SEVERITY,
"Operation on two GEOMETRIES with different SRIDs\n");
if ( (Pointer *)PG_GETARG_DATUM(0) != (Pointer *)geom1 )
pfree(geom1);
if (pglwgeom_getSRID(geom1) != pglwgeom_getSRID(geom2))
{
- elog(ERROR,
+ elog(BTREE_SRID_MISMATCH_SEVERITY,
"Operation on two GEOMETRIES with different SRIDs\n");
if ( (Pointer *)PG_GETARG_DATUM(0) != (Pointer *)geom1 )
pfree(geom1);
if (pglwgeom_getSRID(geom1) != pglwgeom_getSRID(geom2))
{
- elog(ERROR,
+ elog(BTREE_SRID_MISMATCH_SEVERITY,
"Operation on two GEOMETRIES with different SRIDs\n");
if ( (Pointer *)PG_GETARG_DATUM(0) != (Pointer *)geom1 )
pfree(geom1);
if (pglwgeom_getSRID(geom1) != pglwgeom_getSRID(geom2))
{
- elog(ERROR,
+ elog(BTREE_SRID_MISMATCH_SEVERITY,
"Operation on two GEOMETRIES with different SRIDs\n");
if ( (Pointer *)PG_GETARG_DATUM(0) != (Pointer *)geom1 )
pfree(geom1);
if (pglwgeom_getSRID(geom1) != pglwgeom_getSRID(geom2))
{
- elog(ERROR,
+ elog(BTREE_SRID_MISMATCH_SEVERITY,
"Operation on two GEOMETRIES with different SRIDs\n");
if ( (Pointer *)PG_GETARG_DATUM(0) != (Pointer *)geom1 )
pfree(geom1);
if (pglwgeom_getSRID(geom1) != pglwgeom_getSRID(geom2))
{
- elog(ERROR,
+ elog(BTREE_SRID_MISMATCH_SEVERITY,
"Operation on two GEOMETRIES with different SRIDs\n");
if ( (Pointer *)PG_GETARG_DATUM(0) != (Pointer *)geom1 )
pfree(geom1);
/***********************************************************
*
* $Log$
+ * Revision 1.7.2.1 2005/06/15 16:04:31 strk
+ * fault tolerant btree ops
+ *
* Revision 1.7 2005/02/07 13:21:10 strk
* Replaced DEBUG* macros with PGIS_DEBUG*, to avoid clashes with postgresql DEBUG
*