当前位置:网站首页>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)
边栏推荐
猜你喜欢
![[attack and defense world web] difficulty five-star 15 point advanced question: bug](/img/24/4a7f074aac9a08130cf215f0c39b57.png)
[attack and defense world web] difficulty five-star 15 point advanced question: bug

Redis 主从、哨兵、集群架构有缺点比较

Application of encryption technology

jenkins下使用声明式(Declarative)和Jenkinsfile的方式构建Pipeline流水线项目

Codeforces Round #807 (Div. 2)(A-D)

mongodb的多数据源配置

Pipeline pipeline project is built by declarative and jenkinsfile under Jenkins

Docker builds sonarqube, mysql5.7 environment

Esp8266 - at command + network transparent transmission

NGFW portal authentication experiment
随机推荐
webrtc 1对1 -基本架构与目录
day2
深度学习之 9 前馈神经网络 基本概念
Space shooting lesson 07: add graphics
mysql数据库基础
Pytorch with torch no_ grad(): && model.eval()
July 23, 2022 - mapper file description
FPGA——SPI总线控制flash(3)含代码
ansible命令自动补全
GBase 8c模式可见性查询函数(二)
【译】Go RPC 入门:Hello World
Multi knapsack explanation of dynamic programming knapsack problem
Solution to the second game of 2022 Niuke multi school league
Deep learning 9 basic concepts of feedforward neural networks
GBase 8c 访问权限查询函数(五)
Sentinel link mode flow control failure solution
学习的快乐很多
Deep learning 9 feedforward neural network 2: realize feedforward neural network and model optimization
链表——206. 反转链表(这题很重要)
Redis持久化机制RDB、AOF