*
**********************************************************************
* $Log$
+ * Revision 1.3 2004/08/19 13:54:15 strk
+ * cpp checks updated to use 80 instead of 75 for USE_VERSION
+ *
* Revision 1.2 2004/08/19 13:18:01 strk
* Added selectivity estimation
*
#include "lwgeom.h"
-#if USE_VERSION >= 75
+#if USE_VERSION >= 80
#include "commands/vacuum.h"
#include "utils/lsyscache.h"
Datum explode_lwhistogram2d(PG_FUNCTION_ARGS);
Datum estimate_lwhistogram2d(PG_FUNCTION_ARGS);
Datum lwgeom_gist_sel(PG_FUNCTION_ARGS);
-#if USE_VERSION >= 75
+#if USE_VERSION >= 80
Datum lwgeom_analyze(PG_FUNCTION_ARGS);
#endif
/**************************** FROM POSTGIS ****************/
-#if USE_VERSION < 75
+#if USE_VERSION < 80
/*
* get_restriction_var
* Examine the args of a restriction clause to see if it's of the
PG_RETURN_FLOAT8(myest);
}
-#else // USE_VERSION >= 75
+#else // USE_VERSION >= 80
/*
* This function returns an estimate of the selectivity
--
-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-- $Log$
--- Revision 1.1 2004/08/19 13:49:29 strk
--- initial import
+-- Revision 1.2 2004/08/19 13:54:15 strk
+-- cpp checks updated to use 80 instead of 75 for USE_VERSION
--
-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AS '@MODULE_FILENAME@','LWGEOM_out'
LANGUAGE 'C' WITH (isstrict,iscachable);
-#if USE_VERSION >= 75
+#if USE_VERSION >= 80
CREATEFUNCTION geometry_analyze(internal)
RETURNS bool
AS '@MODULE_FILENAME@', 'lwgeom_analyze'
coord_dimension integer not null,
srid integer not null,
type varchar(30) not null,
-#if USE_VERSION < 75
+#if USE_VERSION < 80
attrelid oid,
varattnum int,
stats histogram2d,
GET DIAGNOSTICS foundschema = ROW_COUNT;
#endif
-#if USE_VERSION >= 75
+#if USE_VERSION >= 80
-- no linkage to system table needed
return ''fixed:''||foundschema::text;
#endif
strpos(typecheck.consrc, ''::'')-
strpos(typecheck.consrc, ''='')
))::varchar as type,
-#if USE_VERSION < 75
+#if USE_VERSION < 80
a.attrelid,
a.attnum as varattnum,
null::histogram2d as stats
-- It is defined also for PG>=75 for back-compatibility
--
-----------------------------------------------------------------------
-#if USE_VERSION >= 75
+#if USE_VERSION >= 80
CREATEFUNCTION update_geometry_stats() RETURNS text
AS ' SELECT ''update_geometry_stats() has been obsoleted. Statistics are automatically built running the ANALYZE command''::text' LANGUAGE 'sql';
-#else // USE_VERSION < 75
+#else // USE_VERSION < 80
CREATEFUNCTION update_geometry_stats()
RETURNS text
AS
END;
'
LANGUAGE 'plpgsql' ;
-#endif // USE_VERSION < 75
+#endif // USE_VERSION < 80
-----------------------------------------------------------------------
-- UPDATE_GEOMETRY_STATS( <table>, <column> )
-- It is defined also for PG>=75 for back-compatibility
--
-----------------------------------------------------------------------
-#if USE_VERSION >= 75
+#if USE_VERSION >= 80
CREATEFUNCTION update_geometry_stats(varchar,varchar) RETURNS text
AS 'SELECT update_geometry_stats();' LANGUAGE 'sql' ;
#else
'
LANGUAGE 'plpgsql' ;
-#endif // USE_VERSION < 75
+#endif // USE_VERSION < 80
-----------------------------------------------------------------------
-- FIND_SRID( <schema>, <table>, <geom col> )