当前位置:网站首页>Gbase 8C string operator
Gbase 8C string operator
2022-07-24 00:16:00 【Dazhuang twelve】
GBase 8c The database provides some string operators , Use keywords instead of commas to separate parameters in these functions .
- octet_length(string)
describe : Number of bytes in binary string . return type :int
Example :
gbase=# SELECT octet_length(E'jo\\000se'::bytea) AS RESULT;
result
--------
5
(1 row)
- overlay(string placing string from int [for int])
describe : Replace substring . return type :bytea
Example :
gbase=# SELECT overlay(E'Th\\000omas'::bytea placing E'\\002\\003'::bytea from 2 for 3) AS RESULT;
result
----------------
\x5402036d6173
(1 row)
- position(substring in string) describe : Location of a specific substring . return type :int
Example :
gbase=# SELECT position(E'\\000om'::bytea in E'Th\\000omas'::bytea) AS RESULT;
result
--------
3
(1 row)
- substring(string [from int] [for int])
describe : Intercept substring . return type :bytea
Example :
gbase=# SELECT substring(E'Th\\000omas'::bytea from 2 for 3) AS RESULT;
result
----------
\x68006f
(1 row)
- substr(string, from int [, for int])
describe : Intercept substring . return type :bytea
Example :
gbase=# select substr(E'Th\\000omas'::bytea,2, 3) as result;
result
----------
\x68006f
(1 row)
- trim([both] bytes from string)
describe : from string The beginning and end of delete only contain bytes Longest string in bytes . return type :bytea
Example :
gbase=# SELECT trim(E'\\000'::bytea from E'\\000Tom\\000'::bytea) AS RESULT;
result
----------
\x546f6d
(1 row)
边栏推荐
- kubernetes error
- As a programmer, is there anything you want to say to the newcomer?
- [wechat applet] design and interactive implementation of auction product details page (including countdown and real-time update of bids)
- GBase 8c 访问权限查询函数(一)
- docker 拉取redis镜像 并运行
- 【语音合成】TensorFlowTTS 中文文本转语音
- Jenkins uses sonarqube to build pipeline code review project
- Jenkins 使用sonarqube构建流水线代码审查项目
- paypal订阅流程及api请求
- 474-82(8、221、300)
猜你喜欢

Inftnews | protect the "Snow Mountain Spirit", and the 42verse "digital ecological protection" public welfare project is about to start

What are blue-green deployment, Canary release and a/b test

链表——707. 设计链表

Space shooting lesson 08: improved collision

二叉搜索树的简易实现及剖析

webrtc 1对1 -基本架构与目录

Tencent will close the "magic core". Is there any resistance to the development of digital collections?

腾讯将关闭“幻核”,数字藏品领域发展是否面临阻力?

Y75. Chapter IV Prometheus factory monitoring system and practice -- Prometheus alarm setting (VI)

July 23, 2022 - mapper file description
随机推荐
mysql数据库基础
Pytest interface automated test framework | pytest generates simple test reports
L2TP的LAC自动拨号实验
Structured streaming programming model (input table, result table, output mode...)
Windows software: how to install mysql5.7 and configure environment variables
Application of encryption technology
day2
Tencent cloud was affirmed by international professional streaming media evaluation: video coding performance is the best in all three scenarios
[Android kotlin] property, getter and setter
Pytest interface automated testing framework | common running parameters of pytest
English语法_指示代词 -such / the same
链表——206. 反转链表(这题很重要)
2022牛客多校联赛第二场 题解
【译】Go RPC 入门:Hello World
文本和图片的绘制、数据存储、localStorage、sessionStorage、cookie三者的区别
webrtc 1对1 -基本架构与目录
作为一个程序员,有什么想对新人说的吗?
Pipeline pipeline project is built by declarative and jenkinsfile under Jenkins
太空射击第08课: 改进的碰撞
腾讯将关闭“幻核”,数字藏品领域发展是否面临阻力?