-
-
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.
Add test for function with special character (#1231)
- Loading branch information
1 parent
12d115b
commit 656728c
Showing
8 changed files
with
54 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
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
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
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
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
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
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
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,32 @@ | ||
DROP FUNCTION IF EXISTS "public"."""function.withweired$*;_ characters"; | ||
|
||
CREATE OR REPLACE FUNCTION "public"."""function.withweired$*;_ characters"("Z" integer, x integer, y integer) | ||
RETURNS TABLE("mVt" bytea, key text) AS $$ | ||
SELECT mvt, md5(mvt) as key FROM ( | ||
SELECT ST_AsMVT(tile, 'public."function.withweired$*;_ characters', 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; | ||
|
||
DO $do$ BEGIN | ||
EXECUTE 'COMMENT ON FUNCTION "public"."""function.withweired$*;_ characters" IS $tj$' || $$ | ||
{ | ||
"description": "a function source with special characters", | ||
"vector_layers": [ | ||
{ | ||
"id": "public.\"function.withweired$*;_ characters", | ||
"fields": { | ||
"TABLE": "", | ||
"Geom": "" | ||
} | ||
} | ||
] | ||
} | ||
$$::json || '$tj$'; | ||
END $do$; |