Implement onurctirtir's suggestions

pull/7720/head
German Eichberger 2025-03-12 21:37:18 +00:00
parent 09ab4bdcb3
commit 7aa3e93852
4 changed files with 16 additions and 7 deletions

View File

@ -1686,7 +1686,7 @@ citus_is_primary_node(PG_FUNCTION_ARGS)
"UDF. Otherwise, if you're going to use this node as a " "UDF. Otherwise, if you're going to use this node as a "
"worker node for a new cluster, make sure to add this " "worker node for a new cluster, make sure to add this "
"node into the metadata from the coordinator by using " "node into the metadata from the coordinator by using "
"citus_add_node() UDF.")); "citus_add_node() UDF.")));
PG_RETURN_NULL(); PG_RETURN_NULL();
} }

View File

@ -55,3 +55,4 @@ DROP VIEW IF EXISTS pg_catalog.citus_lock_waits;
#include "udfs/citus_internal_update_relation_colocation/12.2-1.sql" #include "udfs/citus_internal_update_relation_colocation/12.2-1.sql"
#include "udfs/repl_origin_helper/12.2-1.sql" #include "udfs/repl_origin_helper/12.2-1.sql"
#include "udfs/citus_finish_pg_upgrade/12.2-1.sql" #include "udfs/citus_finish_pg_upgrade/12.2-1.sql"
#include "udfs/citus_is_primary_node/12.2-1.sql"

View File

@ -26,6 +26,7 @@ DROP FUNCTION citus_internal.commit_management_command_2pc();
ALTER TABLE pg_catalog.pg_dist_transaction DROP COLUMN outer_xid; ALTER TABLE pg_catalog.pg_dist_transaction DROP COLUMN outer_xid;
REVOKE USAGE ON SCHEMA citus_internal FROM PUBLIC; REVOKE USAGE ON SCHEMA citus_internal FROM PUBLIC;
DROP FUNCTION pg_catalog.citus_is_primary_node();
DROP FUNCTION citus_internal.add_colocation_metadata(int, int, int, regtype, oid); DROP FUNCTION citus_internal.add_colocation_metadata(int, int, int, regtype, oid);
DROP FUNCTION citus_internal.add_object_metadata(text, text[], text[], integer, integer, boolean); DROP FUNCTION citus_internal.add_object_metadata(text, text[], text[], integer, integer, boolean);
DROP FUNCTION citus_internal.add_partition_metadata(regclass, "char", text, integer, "char"); DROP FUNCTION citus_internal.add_partition_metadata(regclass, "char", text, integer, "char");

View File

@ -0,0 +1,7 @@
CREATE FUNCTION pg_catalog.citus_is_primary_node()
RETURNS bool
LANGUAGE c
STRICT
AS 'MODULE_PATHNAME', $$citus_is_primary_node$$;
COMMENT ON FUNCTION pg_catalog.citus_is_primary_node()
IS 'returns whether the current node is the primary node in the group';