* VRFS-1213 - work arounds for postgis migrations
This commit is contained in:
parent
b5934bba30
commit
ab2d8c4f8a
|
|
@ -8,3 +8,5 @@ CREATE EXTENSION IF NOT EXISTS postgis WITH SCHEMA public;
|
|||
CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder WITH SCHEMA tiger;
|
||||
CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
|
||||
CREATE EXTENSION IF NOT EXISTS postgis_topology WITH SCHEMA topology;
|
||||
|
||||
set search_path to 'public';
|
||||
|
|
|
|||
|
|
@ -124,12 +124,7 @@ CREATE INDEX jamisp_geom_gix ON jamisp USING GIST (geom);
|
|||
CREATE VIEW current_scores AS SELECT * FROM scores s WHERE score_dt = (SELECT max(score_dt) FROM scores s0 WHERE s0.alocidispid = s.alocidispid AND s0.blocidispid = s.blocidispid);
|
||||
|
||||
--DROP FUNCTION get_work (mylocidispid BIGINT);
|
||||
CREATE FUNCTION get_work (mylocidispid BIGINT)
|
||||
RETURNS TABLE (client_id VARCHAR(64))
|
||||
LANGUAGE plpgsql
|
||||
ROWS 5
|
||||
VOLATILE
|
||||
AS $BODY$
|
||||
CREATE FUNCTION get_work (mylocidispid BIGINT) RETURNS TABLE (client_id VARCHAR(64)) ROWS 5 VOLATILE AS $$
|
||||
BEGIN
|
||||
CREATE TEMPORARY TABLE foo (locidispid BIGINT, locid INT);
|
||||
INSERT INTO foo SELECT DISTINCT locidispid, locidispid/1000000 FROM connections;
|
||||
|
|
@ -142,4 +137,6 @@ BEGIN
|
|||
RETURN QUERY SELECT b.client_id FROM bar b ORDER BY r LIMIT 5;
|
||||
DROP TABLE bar;
|
||||
RETURN;
|
||||
END $BODY$;
|
||||
END;
|
||||
$$ LANGUAGE plpgsql;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue