-
-
Notifications
You must be signed in to change notification settings - Fork 220
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: Handle duplicate function signatures
- Loading branch information
Showing
1 changed file
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
DROP FUNCTION IF EXISTS "MixedCase".function_dup(int, int, int); | ||
CREATE OR REPLACE FUNCTION "MixedCase".function_dup("Z" int, x int, y int) | ||
RETURNS TABLE("mVt" bytea, key text) AS $$ | ||
SELECT mvt, md5(mvt) as key FROM ( | ||
SELECT ST_AsMVT(tile, '"MixedCase".function_Dup', 4096, 'geom') as mvt FROM ( | ||
SELECT | ||
ST_AsMVTGeom( | ||
ST_Transform(ST_CurveToLine("Geom"), 3857), | ||
ST_TileEnvelope("Z", x, y), | ||
4096, 64, true) AS geom | ||
FROM "MixedCase"."MixPoints" | ||
WHERE "Geom" && ST_Transform(ST_TileEnvelope("Z", x, y), 4326) | ||
) as tile WHERE geom IS NOT NULL) src | ||
$$ LANGUAGE SQL IMMUTABLE STRICT PARALLEL SAFE; | ||
|
||
DROP FUNCTION IF EXISTS "MixedCase"."function_Dup"(int, int, int); | ||
CREATE OR REPLACE FUNCTION "MixedCase"."function_Dup"("Z" int, x int, y int) | ||
RETURNS TABLE("mVt" bytea, key text) AS $$ | ||
SELECT mvt, md5(mvt) as key FROM ( | ||
SELECT ST_AsMVT(tile, '"MixedCase".function_Dup', 4096, 'geom') as mvt FROM ( | ||
SELECT | ||
ST_AsMVTGeom( | ||
ST_Transform(ST_CurveToLine("Geom"), 3857), | ||
ST_TileEnvelope("Z", x, y), | ||
4096, 64, true) AS geom | ||
FROM "MixedCase"."MixPoints" | ||
WHERE "Geom" && ST_Transform(ST_TileEnvelope("Z", x, y), 4326) | ||
) as tile WHERE geom IS NOT NULL) src | ||
$$ LANGUAGE SQL IMMUTABLE STRICT PARALLEL SAFE; | ||
|
||
DROP FUNCTION IF EXISTS "MixedCase".function_dup(int, int, int, json); | ||
CREATE OR REPLACE FUNCTION "MixedCase".function_dup(z int, x int, y int, query json) | ||
RETURNS TABLE("mVt" bytea, key text) AS $$ | ||
SELECT mvt, md5(mvt) as key FROM ( | ||
SELECT ST_AsMVT(tile, '"MixedCase".function_Dup', 4096, 'geom') as mvt FROM ( | ||
SELECT | ||
ST_AsMVTGeom( | ||
ST_Transform(ST_CurveToLine("Geom"), 3857), | ||
ST_TileEnvelope(z, x, y), | ||
4096, 64, true) AS geom | ||
FROM "MixedCase"."MixPoints" | ||
WHERE "Geom" && ST_Transform(ST_TileEnvelope(z, x, y), 4326) | ||
) as tile WHERE geom IS NOT NULL) src | ||
$$ LANGUAGE SQL IMMUTABLE STRICT PARALLEL SAFE; | ||
|
||
DROP FUNCTION IF EXISTS "MixedCase".function_dup(int, int, int, jsonb); | ||
CREATE OR REPLACE FUNCTION "MixedCase".function_dup(z int, x int, y int, query jsonb) | ||
RETURNS TABLE("mVt" bytea, key text) AS $$ | ||
SELECT mvt, md5(mvt) as key FROM ( | ||
SELECT ST_AsMVT(tile, '"MixedCase".function_Dup', 4096, 'geom') as mvt FROM ( | ||
SELECT | ||
ST_AsMVTGeom( | ||
ST_Transform(ST_CurveToLine("Geom"), 3857), | ||
ST_TileEnvelope(z, x, y), | ||
4096, 64, true) AS geom | ||
FROM "MixedCase"."MixPoints" | ||
WHERE "Geom" && ST_Transform(ST_TileEnvelope(z, x, y), 4326) | ||
) as tile WHERE geom IS NOT NULL) src | ||
$$ LANGUAGE SQL IMMUTABLE STRICT PARALLEL SAFE; |