DROP FUNCTION pg_catalog.worker_create_schema(bigint,text); DROP FUNCTION pg_catalog.worker_cleanup_job_schema_cache(); DROP FUNCTION pg_catalog.worker_fetch_foreign_file(text, text, bigint, text[], integer[]); DROP FUNCTION pg_catalog.worker_fetch_partition_file(bigint, integer, integer, integer, text, integer); DROP FUNCTION pg_catalog.worker_hash_partition_table(bigint, integer, text, text, oid, anyarray); DROP FUNCTION pg_catalog.worker_merge_files_into_table(bigint, integer, text[], text[]); DROP FUNCTION pg_catalog.worker_range_partition_table(bigint, integer, text, text, oid, anyarray); DROP FUNCTION pg_catalog.worker_repartition_cleanup(bigint); -- If upgrading citus, the columnar objects will be a part of the -- citus extension, and must be detached so that they can be attached -- to the citus_columnar extension. DO $check_citus$ BEGIN IF EXISTS (SELECT 1 FROM pg_catalog.pg_extension AS e INNER JOIN pg_catalog.pg_depend AS d ON (d.refobjid = e.oid) INNER JOIN pg_catalog.pg_proc AS p ON (p.oid = d.objid) WHERE e.extname='citus' and p.proname = 'columnar_handler' ) THEN ALTER EXTENSION citus DROP SCHEMA columnar; ALTER EXTENSION citus DROP SEQUENCE columnar.storageid_seq; -- columnar tables ALTER EXTENSION citus DROP TABLE columnar.options; ALTER EXTENSION citus DROP TABLE columnar.stripe; ALTER EXTENSION citus DROP TABLE columnar.chunk_group; ALTER EXTENSION citus DROP TABLE columnar.chunk; ALTER EXTENSION citus DROP FUNCTION columnar.columnar_handler; ALTER EXTENSION citus DROP ACCESS METHOD columnar; ALTER EXTENSION citus DROP FUNCTION pg_catalog.alter_columnar_table_set; ALTER EXTENSION citus DROP FUNCTION pg_catalog.alter_columnar_table_reset; -- functions under citus_internal for columnar ALTER EXTENSION citus DROP FUNCTION citus_internal.upgrade_columnar_storage; ALTER EXTENSION citus DROP FUNCTION citus_internal.downgrade_columnar_storage; ALTER EXTENSION citus DROP FUNCTION citus_internal.columnar_ensure_am_depends_catalog; END IF; END $check_citus$;