Changeset: 86e3ab46f885 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=86e3ab46f885
Modified Files:
sql/backends/monet5/sql_upgrades.c
sql/storage/bat/bat_logger.c
Branch: geo
Log Message:
The updade code for the geom module will run only when the module is loaded.
diffs (39 lines):
diff --git a/sql/backends/monet5/sql_upgrades.c
b/sql/backends/monet5/sql_upgrades.c
--- a/sql/backends/monet5/sql_upgrades.c
+++ b/sql/backends/monet5/sql_upgrades.c
@@ -1641,6 +1641,7 @@ sql_update_dec2015(Client c)
#endif
/* drop old types (but keep the geometry type) **/
/** pos += snprintf(buf + pos, bufsize - pos, "DROP TYPE Geometry;");
**/
+ if (moduleExists("geom")) {
pos += snprintf(buf + pos, bufsize - pos, "drop type \"point\";");
pos += snprintf(buf + pos, bufsize - pos, "drop type \"curve\";");
pos += snprintf(buf + pos, bufsize - pos, "drop type \"linestring\";");
@@ -5779,6 +5780,7 @@ sql_update_dec2015(Client c)
pos += snprintf(buf + pos, bufsize - pos,
"32761,EPSG,32761,PROJCS[\"WGS 84 / UPS South\"\\,GEOGCS[\"WGS
84\"\\,DATUM[\"WGS_1984\"\\,SPHEROID[\"WGS
84\"\\,6378137\\,298.257223563\\,AUTHORITY[\"EPSG\"\\,\"7030\"]]\\,AUTHORITY[\"EPSG\"\\,\"6326\"]]\\,PRIMEM[\"Greenwich\"\\,0\\,AUTHORITY[\"EPSG\"\\,\"8901\"]]\\,UNIT[\"degree\"\\,0.0174532925199433\\,AUTHORITY[\"EPSG\"\\,\"9122\"]]\\,AUTHORITY[\"EPSG\"\\,\"4326\"]]\\,UNIT[\"metre\"\\,1\\,AUTHORITY[\"EPSG\"\\,\"9001\"]]\\,PROJECTION[\"Polar_Stereographic\"]\\,PARAMETER[\"latitude_of_origin\"\\,-90]\\,PARAMETER[\"central_meridian\"\\,0]\\,PARAMETER[\"scale_factor\"\\,0.994]\\,PARAMETER[\"false_easting\"\\,2000000]\\,PARAMETER[\"false_northing\"\\,2000000]\\,AUTHORITY[\"EPSG\"\\,\"32761\"]\\,AXIS[\"Northing\"\\,NORTH]\\,AXIS[\"Easting\"\\,EAST]],+proj=stere
+lat_0=-90 +lat_ts=-90 +lon_0=0 +k=0.994 +x_0=2000000 +y_0=2000000
+datum=WGS84 +units=m +no_defs ");
pos += snprintf(buf + pos, bufsize - pos,
"32766,EPSG,32766,PROJCS[\"WGS 84 / TM 36 SE\"\\,GEOGCS[\"WGS
84\"\\,DATUM[\"WGS_1984\"\\,SPHEROID[\"WGS
84\"\\,6378137\\,298.257223563\\,AUTHORITY[\"EPSG\"\\,\"7030\"]]\\,AUTHORITY[\"EPSG\"\\,\"6326\"]]\\,PRIMEM[\"Greenwich\"\\,0\\,AUTHORITY[\"EPSG\"\\,\"8901\"]]\\,UNIT[\"degree\"\\,0.0174532925199433\\,AUTHORITY[\"EPSG\"\\,\"9122\"]]\\,AUTHORITY[\"EPSG\"\\,\"4326\"]]\\,UNIT[\"metre\"\\,1\\,AUTHORITY[\"EPSG\"\\,\"9001\"]]\\,PROJECTION[\"Transverse_Mercator\"]\\,PARAMETER[\"latitude_of_origin\"\\,0]\\,PARAMETER[\"central_meridian\"\\,36]\\,PARAMETER[\"scale_factor\"\\,0.9996]\\,PARAMETER[\"false_easting\"\\,500000]\\,PARAMETER[\"false_northing\"\\,10000000]\\,AUTHORITY[\"EPSG\"\\,\"32766\"]\\,AXIS[\"Easting\"\\,EAST]\\,AXIS[\"Northing\"\\,NORTH]],+proj=tmerc
+lat_0=0 +lon_0=36 +k=0.9996 +x_0=500000 +y_0=10000000 +datum=WGS84 +units=m
+no_defs ");
pos += snprintf(buf + pos, bufsize - pos,
"900913,spatialreferencing.org,900913,PROJCS[\"Popular Visualisation CRS /
Mercator (deprecated)\"\\,GEOGCS[\"Popular Visualisation
CRS\"\\,DATUM[\"Popular_Visualisation_Datum\"\\,SPHEROID[\"Popular
Visualisation
Sphere\"\\,6378137\\,0\\,AUTHORITY[\"EPSG\"\\,\"7059\"]]\\,TOWGS84[0\\,0\\,0\\,0\\,0\\,0\\,0]\\,AUTHORITY[\"EPSG\"\\,\"6055\"]]\\,PRIMEM[\"Greenwich\"\\,0\\,AUTHORITY[\"EPSG\"\\,\"8901\"]]\\,UNIT[\"degree\"\\,0.01745329251994328\\,AUTHORITY[\"EPSG\"\\,\"9122\"]]\\,AUTHORITY[\"EPSG\"\\,\"4055\"]]\\,UNIT[\"metre\"\\,1\\,AUTHORITY[\"EPSG\"\\,\"9001\"]]\\,PROJECTION[\"Mercator_1SP\"]\\,PARAMETER[\"central_meridian\"\\,0]\\,PARAMETER[\"scale_factor\"\\,1]\\,PARAMETER[\"false_easting\"\\,0]\\,PARAMETER[\"false_northing\"\\,0]\\,AUTHORITY[\"EPSG\"\\,\"3785\"]\\,AXIS[\"X\"\\,EAST]\\,AXIS[\"Y\"\\,NORTH]],+proj=merc
+a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m
+nadgrids=@null +no_defs");
+ }
if (schema) {
pos += snprintf(buf + pos, bufsize - pos, "set schema
\"%s\";\n", schema);
diff --git a/sql/storage/bat/bat_logger.c b/sql/storage/bat/bat_logger.c
--- a/sql/storage/bat/bat_logger.c
+++ b/sql/storage/bat/bat_logger.c
@@ -11,6 +11,7 @@
#include "bat_utils.h"
#include "sql_types.h" /* EC_POS */
#include "libgeom.h"
+#include "mal_module.h"
logger *bat_logger = NULL;
logger *bat_logger_shared = NULL;
@@ -223,7 +224,7 @@ bl_postversion( void *lg)
s = NULL;
}
}
- if (catalog_version <= CATALOG_JUL2015) {
+ if (catalog_version <= CATALOG_JUL2015 && moduleExists("geom")) {
/* Do the updates needed for the new geom module */
BAT *ct, *cnt, *cd, *cnd, *cs, *cns, *cn, *ctid, *ti, *tn, *ts,
*si, *sn, *g;
BATiter cti, cdi, csi, cni, ctidi, tsi, tni, sni, gi;
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list