mirror of https://github.com/citusdata/citus.git
Implement onurctirtir's suggestions
parent
09ab4bdcb3
commit
7aa3e93852
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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");
|
||||||
|
|
|
@ -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';
|
Loading…
Reference in New Issue