2002-10-19 02:41:22 +08:00
|
|
|
-- Adjust this setting to control where the objects get created.
|
|
|
|
SET search_path = public;
|
|
|
|
|
|
|
|
SET autocommit TO 'on';
|
2000-06-16 03:05:22 +08:00
|
|
|
|
|
|
|
--------------- geo_distance
|
|
|
|
|
2002-10-19 02:41:22 +08:00
|
|
|
CREATE OR REPLACE FUNCTION geo_distance (point, point)
|
|
|
|
RETURNS float8
|
|
|
|
LANGUAGE 'C' IMMUTABLE STRICT AS 'MODULE_PATHNAME';
|
2000-06-16 03:05:22 +08:00
|
|
|
|
|
|
|
--------------- geo_distance as operator <@>
|
|
|
|
|
|
|
|
CREATE OPERATOR <@> (
|
2002-10-19 02:41:22 +08:00
|
|
|
LEFTARG = point,
|
|
|
|
RIGHTARG = point,
|
|
|
|
PROCEDURE = geo_distance,
|
|
|
|
COMMUTATOR = <@>
|
2000-06-16 03:05:22 +08:00
|
|
|
);
|