parent
dd907ac2bc
commit
e08ca8f6bc
@ -17,4 +17,17 @@ $func$ LANGUAGE plpgsql;
|
||||
-- Taken from https://stackoverflow.com/a/48013356/351721
|
||||
CREATE OR REPLACE FUNCTION cdb_dataservices_client.cdb_jsonb_array_casttext(jsonb) RETURNS text[] AS $f$
|
||||
SELECT array_agg(x) || ARRAY[]::text[] FROM jsonb_array_elements_text($1) t(x);
|
||||
$f$ LANGUAGE sql IMMUTABLE;
|
||||
$f$ LANGUAGE sql IMMUTABLE;
|
||||
|
||||
|
||||
-- PG12_DEPRECATED
|
||||
-- Create geomval if it doesn't exist (in postgis 3+ it only exists in postgis_raster)
|
||||
DO $$
|
||||
BEGIN
|
||||
IF NOT EXISTS (SELECT 1 FROM pg_type WHERE typname = 'geomval') THEN
|
||||
CREATE TYPE geomval AS (
|
||||
geom geometry,
|
||||
val double precision
|
||||
);
|
||||
END IF;
|
||||
END$$;
|
Loading…
Reference in New Issue
Block a user