本页介绍天翼云TeleDB数据库创建一个与函数同名的存储过程的错误提示和替换方案。 如创建一个与函数同名的存储过程会提示function xxx already exists with same argument types。 plaintext teledb CREATE OR REPLACE FUNCTION proc1() RETURNS void AS $$ begin raise notice 'Hello teledbpg'; end; $$ LANGUAGE PLPGSQL; CREATE FUNCTION teledb CREATE PROCEDURE proc1() AS $$ begin raise notice 'Hello teledbpg'; end; $$ LANGUAGE PLPGSQL; ERROR: function "proc1" already exists with same argument types teledb 如果要替换,则提示。 plaintext teledb CREATE OR REPLACE PROCEDURE proc1() AS $$ begin raise notice 'Hello teledbpg'; end; $$ LANGUAGE PLPGSQL; ERROR: cannot change routine kind DETAIL: "proc1" is a function. teledb
本页介绍天翼云TeleDB数据库创建一个与函数同名的存储过程的错误提示和替换方案。 如创建一个与函数同名的存储过程会提示function xxx already exists with same argument types。 plaintext teledb CREATE OR REPLACE FUNCTION proc1() RETURNS void AS $$ begin raise notice 'Hello teledbpg'; end; $$ LANGUAGE PLPGSQL; CREATE FUNCTION teledb CREATE PROCEDURE proc1() AS $$ begin raise notice 'Hello teledbpg'; end; $$ LANGUAGE PLPGSQL; ERROR: function "proc1" already exists with same argument types teledb 如果要替换,则提示。 plaintext teledb CREATE OR REPLACE PROCEDURE proc1() AS $$ begin raise notice 'Hello teledbpg'; end; $$ LANGUAGE PLPGSQL; ERROR: cannot change routine kind DETAIL: "proc1" is a function. teledb
本页介绍天翼云TeleDB数据库的复制表功能。 复制表是所有DN 节点都存储一份相同的数据。 plaintext teledb create table trep (id int,mc text) distribute by replication; CREATE TABLE teledb d+ trep Table "public.trep" Column Type Collation Nullable Default Storage Stats target Description +++++++ id integer plain mc text extended Distribute By: REPLICATION Location Nodes: ALL DATANODES 所有节点都会保存一份数据 plaintext teledb insert into trep values(1,'teledb'),(2,'ctyun'); COPY 2 teledb EXECUTE DIRECT ON (dn01) 'select from trep'; id mc + 1 teledb 2 ctyun (2 rows) teledb EXECUTE DIRECT ON (dn02) 'select from trep'; id mc + 1 teledb 2 ctyun (2 rows)
本页介绍天翼云TeleDB数据库创建一个与函数同名的存储过程的错误提示和替换方案。 如创建一个与函数同名的存储过程会提示function xxx already exists with same argument types。 plaintext teledb CREATE OR REPLACE FUNCTION proc1() RETURNS void AS $$ begin raise notice 'Hello teledbpg'; end; $$ LANGUAGE PLPGSQL; CREATE FUNCTION teledb CREATE PROCEDURE proc1() AS $$ begin raise notice 'Hello teledbpg'; end; $$ LANGUAGE PLPGSQL; ERROR: function "proc1" already exists with same argument types teledb 如果要替换,则提示。 plaintext teledb CREATE OR REPLACE PROCEDURE proc1() AS $$ begin raise notice 'Hello teledbpg'; end; $$ LANGUAGE PLPGSQL; ERROR: cannot change routine kind DETAIL: "proc1" is a function. teledb