当前位置:网站首页>GBase 8c 二进制字符串操作符
GBase 8c 二进制字符串操作符
2022-07-24 00:16:00 【大壮十二】
GBase 8c提供了常用的函数调用语法。
- btrim(string bytea,bytes bytea)
描述:从string的开头和结尾删除只包含bytes中字节的最长的字符串。返回值类型:bytea
示例:
gbase=# SELECT btrim(E'\\000trim\\000'::bytea, E'\\000'::bytea) AS RESULT;
result
------------
\x7472696d
(1 row)
- get_bit(string, offset)
描述:从字符串中抽取位。返回值类型:int
示例:
gbase=# SELECT get_bit(E'Th\\000omas'::bytea, 45) AS RESULT;
result
--------
1
(1 row)
- get_byte(string, offset)
描述:从字符串中抽取字节。返回值类型:int
示例:
gbase=# SELECT get_byte(E'Th\\000omas'::bytea, 4) AS RESULT;
result
--------
109
(1 row)
- rawcmp
描述:raw数据类型比较函数。参数:raw, raw
返回值类型:integer
- raweq
描述:raw数据类型比较函数。参数:raw, raw
返回值类型:boolean
- rawge
描述:raw数据类型比较函数。参数:raw, raw
返回值类型:boolean
- rawgt
描述:raw数据类型比较函数。参数:raw, raw
返回值类型:boolean
- rawin
描述:raw数据类型解析函数。参数:cstring
返回值类型:bytea
- rawle
描述:raw数据类型解析函数。参数:raw, raw
返回值类型:boolean
- rawlike
描述:raw数据类型解析函数。参数:raw, raw
返回值类型:boolean
- rawlt
描述:raw数据类型解析函数。参数:raw, raw
返回值类型:boolean
- rawne
描述:比较raw类型是否一样。参数:raw, raw
返回值类型:boolean
- rawnlike
描述:比较raw类型与模式是否不匹配。参数:raw, raw
返回值类型:boolean
- rawout
描述:RAW类型的输出接口。参数:bytea
返回值类型:cstring
- rawsend
描述:转换bytea为二进制类型。参数:raw
返回值类型:bytea
- rawtohex
描述:raw格式转换为十六进制。参数:text
返回值类型:text
- set_bit(string,offset, newvalue)
描述:设置字符串中的位。返回值类型:bytea
示例:
gbase=# SELECT set_bit(E'Th\\000omas'::bytea, 45, 0) AS RESULT;
result
------------------
\x5468006f6d4173
(1 row)
- set_byte(string,offset, newvalue)
描述:设置字符串中的字节。返回值类型:bytea
示例:
gbase=# SELECT set_byte(E'Th\\000omas'::bytea, 4, 64) AS RESULT;
result
------------------
\x5468006f406173
(1 row)
边栏推荐
- 自己喜欢投资
- FPGA - SPI bus control flash (3) including code
- Beijing University qingniaochangping Campus: how about the current situation of operation and maintenance employment? Are skills required?
- Automatic escape processing in JMeter
- C language explanation series -- understanding of functions (2) how to use functions to exchange the values of two integer variables
- Pytest interface automated testing framework | how to get help
- Space shooting lesson 07: add graphics
- 腾讯将关闭“幻核”,数字藏品领域发展是否面临阻力?
- Esp8266 - at command + network transparent transmission
- 474-82(8、221、300)
猜你喜欢

Esp8266 - at command + network transparent transmission

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

Take stock of 10 new layer1 to prepare for the next bull market

mysql数据库基础

Nacos

【HCIP】MGRE环境下OSPF实验,含多进程双向重发布及OSPF特殊区域

Lac automatic dialing experiment of L2TP

盘点为下个牛市做准备的10个新Layer1

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

paypal订阅流程及api请求
随机推荐
【低代码】低代码发展的局限性
kubernetes error
GBase 8c系统表信息函数(二)
Tencent cloud was affirmed by international professional streaming media evaluation: video coding performance is the best in all three scenarios
自己喜欢投资
[wechat applet] design and interactive implementation of auction product details page (including countdown and real-time update of bids)
NGFW portal authentication experiment
Input and output of ACM mode
Beijing University qingniaochangping Campus: how about the current situation of operation and maintenance employment? Are skills required?
C language explanation series -- understanding of functions (2) how to use functions to exchange the values of two integer variables
【HCIP】MGRE环境下OSPF实验,含多进程双向重发布及OSPF特殊区域
Nacos
A lot of happiness in learning
Scheme for importing XMIND use cases into tapd (with code)
力扣刷题训练之超简单
Pytest interface automated testing framework | how to get help
Redis 主从、哨兵、集群架构有缺点比较
vulnhub wpwn: 1
文本和图片的绘制、数据存储、localStorage、sessionStorage、cookie三者的区别
作为一个程序员,有什么想对新人说的吗?