http://www.postgresql.org/docs/current/static/functions-string.html
下了一张postgresql 的cheatsheet,看见好多不认识的字符,数字操作函数
譬如这个overlay
上面的URL解释是
写道
overlay(string placing string from int [for int])
text Replace substring
overlay('Txxxxas' placing 'hom' from 2 for 4)
Thomas
text Replace substring
overlay('Txxxxas' placing 'hom' from 2 for 4)
Thomas
第一个参数是起始位置,第二个是要被代替的字符长度
但是第一个起始位置参数,不是从0开始的,从1开始,,,,一时半会习惯不过来
另外几个字符串操作也都如此
position(substring in string)
substring(string [from int] [for int])
本文介绍 PostgreSQL 中的字符串操作函数,如 overlay 和 position 的使用方法。特别讲解了 overlay 函数中各参数的意义及使用场景,帮助读者理解如何替换字符串中的指定部分。
3576

被折叠的 条评论
为什么被折叠?



