pull/8014/head
Onur Tirtir 2025-06-01 22:48:23 +03:00
parent 8f4cc9131c
commit 194fbd8ee1
5 changed files with 16 additions and 16 deletions

View File

@ -50,9 +50,7 @@ DROP VIEW IF EXISTS pg_catalog.citus_nodes;
-- Definition of shard_name() prior to this release doesn't have a separate SQL file
-- because it's quite an old UDF that its prior definition(s) was(were) squashed into
-- citus--8.0-1.sql. For this reason, to downgrade it, here we directly execute its old
-- definition instead of including it from such a separate file. The only difference
-- between below CREATE command and the one in citus--8.0-1.sql is that this one has
-- ".. OR REPLACE .." clause to be able to replace its existing definition.
-- definition instead of including it from such a separate file.
--
-- And before dropping and creating the function, we also need to drop citus_shards view
-- since it depends on it. And immediately after creating the function, we recreate
@ -60,12 +58,12 @@ DROP VIEW IF EXISTS pg_catalog.citus_nodes;
DROP VIEW pg_catalog.citus_shards;
DROP FUNCTION pg_catalog.shard_name(object_name regclass, shard_id bigint, skip_qualifying_public);
CREATE OR REPLACE FUNCTION pg_catalog.shard_name(object_name regclass, shard_id bigint)
DROP FUNCTION pg_catalog.shard_name(object_name regclass, shard_id bigint, skip_qualify_public boolean);
CREATE FUNCTION pg_catalog.shard_name(object_name regclass, shard_id bigint)
RETURNS text
LANGUAGE C STABLE STRICT
AS 'MODULE_PATHNAME', $$shard_name$$;
COMMENT ON FUNCTION pg_catalog.shard_name(object_name regclass, shard_id bigint)
IS 'returns schema-qualified, shard-extended identifier of object name';
#include "udfs/citus_shards/12.0-1.sql"
#include "../udfs/citus_shards/12.0-1.sql"

View File

@ -1,8 +1,8 @@
-- skip_qualifying_public is set to true by default just for backward compatibility
-- skip_qualify_public is set to true by default just for backward compatibility
DROP FUNCTION pg_catalog.shard_name(object_name regclass, shard_id bigint);
CREATE OR REPLACE FUNCTION pg_catalog.shard_name(object_name regclass, shard_id bigint, skip_qualifying_public boolean DEFAULT true)
CREATE FUNCTION pg_catalog.shard_name(object_name regclass, shard_id bigint, skip_qualify_public boolean DEFAULT true)
RETURNS text
LANGUAGE C STABLE STRICT
AS 'MODULE_PATHNAME', $$shard_name$$;
COMMENT ON FUNCTION pg_catalog.shard_name(object_name regclass, shard_id bigint, skip_qualifying_public boolean)
COMMENT ON FUNCTION pg_catalog.shard_name(object_name regclass, shard_id bigint, skip_qualify_public boolean)
IS 'returns schema-qualified, shard-extended identifier of object name';

View File

@ -1,8 +1,8 @@
-- skip_qualifying_public is set to true by default just for backward compatibility
-- skip_qualify_public is set to true by default just for backward compatibility
DROP FUNCTION pg_catalog.shard_name(object_name regclass, shard_id bigint);
CREATE OR REPLACE FUNCTION pg_catalog.shard_name(object_name regclass, shard_id bigint, skip_qualifying_public boolean DEFAULT true)
CREATE FUNCTION pg_catalog.shard_name(object_name regclass, shard_id bigint, skip_qualify_public boolean DEFAULT true)
RETURNS text
LANGUAGE C STABLE STRICT
AS 'MODULE_PATHNAME', $$shard_name$$;
COMMENT ON FUNCTION pg_catalog.shard_name(object_name regclass, shard_id bigint, skip_qualifying_public boolean)
COMMENT ON FUNCTION pg_catalog.shard_name(object_name regclass, shard_id bigint, skip_qualify_public boolean)
IS 'returns schema-qualified, shard-extended identifier of object name';

View File

@ -1455,6 +1455,7 @@ SELECT * FROM multi_extension.print_extension_changes();
previous_object | current_object
---------------------------------------------------------------------
function citus_unmark_object_distributed(oid,oid,integer) void |
function shard_name(regclass,bigint) text |
| function citus_internal.acquire_citus_advisory_object_class_lock(integer,cstring) void
| function citus_internal.add_colocation_metadata(integer,integer,integer,regtype,oid) void
| function citus_internal.add_object_metadata(text,text[],text[],integer,integer,boolean) void
@ -1483,9 +1484,10 @@ SELECT * FROM multi_extension.print_extension_changes();
| function citus_stat_counters(oid) SETOF record
| function citus_stat_counters_reset(oid) void
| function citus_unmark_object_distributed(oid,oid,integer,boolean) void
| function shard_name(regclass,bigint,boolean) text
| view citus_nodes
| view citus_stat_counters
(31 rows)
(33 rows)
DROP TABLE multi_extension.prev_objects, multi_extension.extension_diff;
-- show running version

View File

@ -289,7 +289,7 @@ ORDER BY 1;
function run_command_on_placements(regclass,text,boolean)
function run_command_on_shards(regclass,text,boolean)
function run_command_on_workers(text,boolean)
function shard_name(regclass,bigint)
function shard_name(regclass,bigint,boolean)
function start_metadata_sync_to_all_nodes()
function start_metadata_sync_to_node(text,integer)
function stop_metadata_sync_to_node(text,integer,boolean)
@ -381,8 +381,7 @@ ORDER BY 1;
view citus_lock_waits
view citus_locks
view citus_nodes
view citus_schema.citus_schemas
view citus_schema.citus_tables
view citus_schemas
view citus_shard_indexes_on_worker
view citus_shards
view citus_shards_on_worker
@ -391,6 +390,7 @@ ORDER BY 1;
view citus_stat_statements
view citus_stat_tenants
view citus_stat_tenants_local
view citus_tables
view pg_dist_shard_placement
view time_partitions
(362 rows)