Changeset: 747ccab8bae0 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/747ccab8bae0
Modified Files:
geom/sql/40_geom.sql
sql/backends/monet5/sql_upgrades.c
Branch: geo-update-dev
Log Message:
Reorganized SQL functions in 40_geom and fixed the SQL code update for the
SHPload functions.
diffs (46 lines):
diff --git a/geom/sql/40_geom.sql b/geom/sql/40_geom.sql
--- a/geom/sql/40_geom.sql
+++ b/geom/sql/40_geom.sql
@@ -10,23 +10,22 @@
------------------------- Geography functions ---------------------------
-------------------------------------------------------------------------
CREATE FUNCTION ST_DistanceGeographic(geom1 Geometry, geom2 Geometry) RETURNS
double EXTERNAL NAME geom."DistanceGeographic";
-GRANT EXECUTE ON FUNCTION ST_DistanceGeographic(Geometry, Geometry) TO PUBLIC;
-CREATE FUNCTION ST_CoversGeographic(geom1 Geometry, geom2 Geometry) RETURNS
boolean EXTERNAL NAME geom."CoversGeographic";
-GRANT EXECUTE ON FUNCTION ST_CoversGeographic(Geometry, Geometry) TO PUBLIC;
-
-CREATE AGGREGATE ST_Collect(geom Geometry) RETURNS Geometry external name
aggr."Collect";
-
CREATE FILTER FUNCTION ST_DWithinGeographic(geom1 Geometry, geom2 Geometry,
distance double) EXTERNAL NAME geom."DWithinGeographic";
CREATE FILTER FUNCTION ST_IntersectsGeographic(geom1 Geometry, geom2 Geometry)
EXTERNAL NAME geom."IntersectsGeographic";
-CREATE FUNCTION ST_IntersectsMBR(mbr1 mbr, mbr2 mbr) RETURNS bool EXTERNAL
NAME geom."IntersectsMBR";
+-------------------------------------------------------------------------
+----------------------- New Geometry functions --------------------------
+-------------------------------------------------------------------------
+CREATE AGGREGATE ST_Collect(geom Geometry) RETURNS Geometry external name
aggr."Collect";
+
CREATE FILTER FUNCTION ST_Intersects(geom1 Geometry, geom2 Geometry) EXTERNAL
NAME rtree."Intersects";
CREATE FILTER FUNCTION ST_Intersects_NoIndex(geom1 Geometry, geom2 Geometry)
EXTERNAL NAME geom."Intersects_noindex";
CREATE FILTER FUNCTION ST_DWithin(geom1 Geometry, geom2 Geometry, distance
double) EXTERNAL NAME rtree."DWithin";
CREATE FUNCTION ST_DWithin_NoIndex(geom1 Geometry, geom2 Geometry, distance
double) RETURNS boolean EXTERNAL NAME geom."DWithin";
+
-------------------------------------------------------------------------
-------------------------- Geography functions ---------------------------
+------------------------- Old Geom functions ----------------------------
-------------------------------------------------------------------------
-- make sure you load the geom module before loading this sql module
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
@@ -302,7 +302,7 @@ sql_update_hugeint(Client c, mvc *sql)
static str
sql_update_shp(Client c)
{
- const char *query = "create procedure SHPattach(fname string) external
name shp.attach;\ncreate procedure SHPload(fid integer) external name
shp.import;\ncreate procedure SHPload(fid integer, filter geometry) external
name shp.import;\nupdate sys.functions set system = true where schema_id = 2000
and name in ('shpattach', 'shpload');\n";
+ const char *query = "create procedure SHPLoad(fname string, schemaname
string, tablename string) external name shp.load;\ncreate procedure
SHPLoad(fname string, tablename string) external name shp.load;update
sys.functions set system = true where schema_id = 2000 and name in
('shpload');";
printf("Running database upgrade commands:\n%s\n", query);
return SQLstatementIntern(c, query, "update", true, false, NULL);
}
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]