!6375 【5.0.0回合master】字符集增加pg_description
Merge pull request !6375 from 梅程/suncan_master
This commit is contained in:
@ -0,0 +1,17 @@
|
||||
CREATE OR REPLACE FUNCTION pg_catalog.Delete_pg_collation_temp()
|
||||
RETURNS void
|
||||
AS $$
|
||||
DECLARE
|
||||
row_name record;
|
||||
query_str_nodes text;
|
||||
BEGIN
|
||||
query_str_nodes := 'select * from dbe_perf.node_name';
|
||||
FOR row_name IN EXECUTE(query_str_nodes) LOOP
|
||||
delete from pg_catalog.pg_description where objoid in (1327, 1328, 1800, 1801) and classoid = 3456;
|
||||
END LOOP;
|
||||
return;
|
||||
END;
|
||||
$$ LANGUAGE 'plpgsql';
|
||||
|
||||
SELECT pg_catalog.Delete_pg_collation_temp();
|
||||
DROP FUNCTION pg_catalog.Delete_pg_collation_temp();
|
||||
@ -0,0 +1,17 @@
|
||||
CREATE OR REPLACE FUNCTION pg_catalog.Delete_pg_collation_temp()
|
||||
RETURNS void
|
||||
AS $$
|
||||
DECLARE
|
||||
row_name record;
|
||||
query_str_nodes text;
|
||||
BEGIN
|
||||
query_str_nodes := 'select * from dbe_perf.node_name';
|
||||
FOR row_name IN EXECUTE(query_str_nodes) LOOP
|
||||
delete from pg_catalog.pg_description where objoid in (1327, 1328, 1800, 1801) and classoid = 3456;
|
||||
END LOOP;
|
||||
return;
|
||||
END;
|
||||
$$ LANGUAGE 'plpgsql';
|
||||
|
||||
SELECT pg_catalog.Delete_pg_collation_temp();
|
||||
DROP FUNCTION pg_catalog.Delete_pg_collation_temp();
|
||||
@ -0,0 +1,22 @@
|
||||
CREATE OR REPLACE FUNCTION pg_catalog.update_pg_description(IN colloid integer, IN colldesc text)
|
||||
RETURNS void
|
||||
AS $$
|
||||
DECLARE
|
||||
row_name record;
|
||||
query_str_nodes text;
|
||||
BEGIN
|
||||
query_str_nodes := 'select * from dbe_perf.node_name';
|
||||
FOR row_name IN EXECUTE(query_str_nodes) LOOP
|
||||
delete from pg_catalog.pg_description where objoid = colloid and classoid = 3456;
|
||||
insert into pg_catalog.pg_description values(colloid, 3456, 0, colldesc);
|
||||
END LOOP;
|
||||
return;
|
||||
END;
|
||||
$$ LANGUAGE 'plpgsql';
|
||||
|
||||
select pg_catalog.update_pg_description(1327, 'gbk_chinese_ci collation');
|
||||
select pg_catalog.update_pg_description(1328, 'gbk_bin collation');
|
||||
select pg_catalog.update_pg_description(1800, 'gb18030_chinese_ci collation');
|
||||
select pg_catalog.update_pg_description(1801, 'gb18030_bin collation');
|
||||
|
||||
DROP FUNCTION pg_catalog.update_pg_description;
|
||||
@ -0,0 +1,22 @@
|
||||
CREATE OR REPLACE FUNCTION pg_catalog.update_pg_description(IN colloid integer, IN colldesc text)
|
||||
RETURNS void
|
||||
AS $$
|
||||
DECLARE
|
||||
row_name record;
|
||||
query_str_nodes text;
|
||||
BEGIN
|
||||
query_str_nodes := 'select * from dbe_perf.node_name';
|
||||
FOR row_name IN EXECUTE(query_str_nodes) LOOP
|
||||
delete from pg_catalog.pg_description where objoid = colloid and classoid = 3456;
|
||||
insert into pg_catalog.pg_description values(colloid, 3456, 0, colldesc);
|
||||
END LOOP;
|
||||
return;
|
||||
END;
|
||||
$$ LANGUAGE 'plpgsql';
|
||||
|
||||
select pg_catalog.update_pg_description(1327, 'gbk_chinese_ci collation');
|
||||
select pg_catalog.update_pg_description(1328, 'gbk_bin collation');
|
||||
select pg_catalog.update_pg_description(1800, 'gb18030_chinese_ci collation');
|
||||
select pg_catalog.update_pg_description(1801, 'gb18030_bin collation');
|
||||
|
||||
DROP FUNCTION pg_catalog.update_pg_description;
|
||||
Reference in New Issue
Block a user