加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

postgrelsql contcat聚合函数

发布时间:2020-12-13 23:01:08 所属栏目:百科 来源:网络整理
导读:CREATE OR REPLACE FUNCTION _concat(IN str1 text,IN str2 text,OUT str text) RETURNS text AS $BODY$ BEGIN str := ''; if str1 IS NOT NULL then str := str ||str1 ; end if; if str2 IS NOT NULL then str := str || str2 || ','; end if; END; $BODY$
CREATE OR REPLACE FUNCTION _concat(IN str1 text,IN str2 text,OUT str text) RETURNS text AS $BODY$ BEGIN str := ''; if str1 IS NOT NULL then str := str ||str1 ; end if; if str2 IS NOT NULL then str := str || str2 || ','; end if; END; $BODY$ LANGUAGE plpgsql VOLATILE COST 100; ALTER FUNCTION _concat(text,text) OWNER TO engires301; CREATE AGGREGATE concat ( BASETYPE = text,SFUNC = _concat,STYPE = text );

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读