0 £ˆí�þ]ig#rHóO‘¢ÇüÿÛ ‚\ÚëÆ×t£export declare const subMonths: import("./types.ts").FPFn2< Date, number, import("../fp.ts").DateArg >; E¥ˆl–Ým_J•4Ÿº‚„ ¸n2Ú˜´o�þehbifË#m½+A$óÜ … Û_‹uÐb &=L#µÈÙ?÷¥-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- ---- -- PostGIS - Spatial Types for PostgreSQL -- http://postgis.net -- -- Copyright (C) 2011 Regina Obe -- -- This is free software; you can redistribute and/or modify it under -- the terms of the GNU General Public Licence. See the COPYING file. -- -- Author: Regina Obe -- -- This is a suite of SQL helper functions for use during a PostGIS extension install/upgrade -- The functions get uninstalled after the extention install/upgrade process --------------------------- -- postgis_extension_remove_objects: This function removes objects of a particular class from an extension -- this is needed because there is no ALTER EXTENSION DROP FUNCTION/AGGREGATE command -- and we can't CREATE OR REPALCe functions whose signatures have changed and we can drop them if they are part of an extention -- So we use this to remove it from extension first before we drop CREATE FUNCTION postgis_extension_remove_objects(param_extension text, param_type text) RETURNS boolean AS $$ DECLARE var_sql text := ''; var_r record; var_result boolean := false; var_class text := ''; var_is_aggregate boolean := false; var_sql_list text := ''; var_pgsql_version integer := pg_catalog.current_setting('server_version_num'); BEGIN var_class := CASE WHEN pg_catalog.lower(param_type) OPERATOR(pg_catalog.=)'function' OR pg_catalog.lower(param_type) OPERATOR(pg_catalog.=) 'aggregate' THEN 'pg_catalog.pg_proc' ELSE '' END; var_is_aggregate := CASE WHEN pg_catalog.lower(param_type) OPERATOR(pg_catalog.=) 'aggregate' THEN true ELSE false END; IF var_pgsql_version OPERATOR(pg_catalog.<) 110000 THEN var_sql_list := $sql$SELECT 'ALTER EXTENSION ' OPERATOR(pg_catalog.||) e.extname OPERATOR(pg_catalog.||) ' DROP ' OPERATOR(pg_catalog.||) $3 OPERATOR(pg_catalog.||) ' ' OPERATOR(pg_catalog.||) COALESCE(proc.proname OPERATOR(pg_catalog.||) '(' OPERATOR(pg_catalog.||) oidvectortypes(proc.proargtypes) OPERATOR(pg_catalog.||) ')' ,typ.typname, cd.relname, op.oprname, cs.typname OPERATOR(pg_catalog.||) ' AS ' OPERATOR(pg_catalog.||) ct.typname OPERATOR(pg_catalog.||) ') ', opcname, opfname) OPERATOR(pg_catalog.||) ';' AS remove_command FROM pg_catalog.pg_depend As d INNER JOIN pg_catalog.pg_extension As e ON d.refobjid OPERATOR(pg_catalog.=) e.oid INNER JOIN pg_catalog.pg_class As c ON c.oid OPERATOR(pg_catalog.=) d.classid LEFT JOIN pg_catalog.pg_proc AS proc ON proc.oid OPERATOR(pg_catalog.=) d.objid LEFT JOIN pg_catalog.pg_type AS typ ON typ.oid OPERATOR(pg_catalog.=) d.objid LEFT JOIN pg_catalog.pg_class As cd ON cd.oid OPERATOR(pg_catalog.=) d.objid LEFT JOIN pg_operator As op ON op.oid OPERATOR(pg_catalog.=) d.objid LEFT JOIN pg_catalog.pg_cast AS ca ON ca.oid OPERATOR(pg_catalog.=) d.objid LEFT JOIN pg_catalog.pg_type AS cs ON ca.castsource OPERATOR(pg_catalog.=) cs.oid LEFT JOIN pg_catalog.pg_type AS ct ON ca.casttarget OPERATOR(pg_catalog.=) ct.oid LEFT JOIN pg_opclass As oc ON oc.oid OPERATOR(pg_catalog.=) d.objid LEFT JOIN pg_opfamily As ofa ON ofa.oid OPERATOR(pg_catalog.=) d.objid WHERE d.deptype OPERATOR(pg_catalog.=) 'e' and e.extname OPERATOR(pg_catalog.=) $1 and c.relname OPERATOR(pg_catalog.=) $2 AND COALESCE(proc.proisagg, false) OPERATOR(pg_catalog.=) $4;$sql$; ELSE -- for PostgreSQL 11 and above, they removed proc.proisagg among others and replaced with some func type thing var_sql_list := $sql$SELECT 'ALTER EXTENSION ' OPERATOR(pg_catalog.||) e.extname OPERATOR(pg_catalog.||) ' DROP ' OPERATOR(pg_catalog.||) $3 OPERATOR(pg_catalog.||) ' ' OPERATOR(pg_catalog.||) COALESCE(proc.proname OPERATOR(pg_catalog.||) '(' OPERATOR(pg_catalog.||) oidvectortypes(proc.proargtypes) OPERATOR(pg_catalog.||) ')' ,typ.typname, cd.relname