
Functions and Operators
|ChuckChen|
本博客为记录作者平时测试与学习笔记,并分享给大家。专注原创。希望可以带给大家一些技术上的分享。
本博客仅作者本人所有, 与 AWS 官方没有任何关联。所有言论也仅代表作者本人。
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Postgresql - Functions and Operators 函数和运算 - Text Search
text search类型的相关函数和运算 Operator Return Type Description Example Result @@ boolean tsvector 是否匹配 tsquery to_t...原创 2018-08-06 07:46:39 · 234 阅读 · 0 评论 -
Postgresql - Functions and Operators 函数和运算 - Binary String
对二进制字符串的函数,运算,这个一般并不常用,用法也很类似与对String的操作。 Function Return Type Description Example Result string || string bytea 字符串连接...原创 2018-08-03 11:23:15 · 263 阅读 · 0 评论 -
Postgresql - Functions and Operators 函数和运算 - Bit String
对bit字符串的操作,一般情况下是用不到的哟。仅作了解 Operator Description Example Result || 字符串连接 B'10001' || B'011' 10001011 & ...原创 2018-08-03 11:27:54 · 193 阅读 · 0 评论 -
Postgresql - Functions and Operators 函数和运算 - Pattern Matching
LIKE:'abc' LIKE 'abc' true 'abc' LIKE 'a%' true 'abc' LIKE '_b_' true 'abc' LIKE 'c' 不能匹配 SIMILAR TO:'abc' SIMILAR TO 'abc' true 'abc' SIMILAR TO 'a' 不能匹配 'abc' SIMILAR TO '%(b|d)%' true 'abc'...原创 2018-08-03 13:54:50 · 153 阅读 · 0 评论 -
Postgresql - Functions and Operators 函数和运算 - Data Type Formatting
数据类型格式化转换,在查询时会比较常见。 Function Return Type Description Example to_char(timestamp, text) text 转换时间戳为字符串 to_char(current_t...原创 2018-08-03 13:57:25 · 136 阅读 · 0 评论 -
Postgresql - Functions and Operators 函数和运算 - Date/Time
日期时间的函数和运算。 Operator Example Result + date '2001-09-28' + integer '7' date '2001-10-05' + date '2001-09-28' + interval '...原创 2018-08-03 13:59:14 · 309 阅读 · 0 评论 -
Postgresql - Functions and Operators 函数和运算 - Enum
枚举类型的函数很少,都是查询枚举类型中的值相关。 Function Description Example Example Result enum_first(anyenum) 返回枚举中的第一个值 enum_first(null::rainbow) ...原创 2018-08-03 14:05:31 · 166 阅读 · 0 评论 -
Postgresql - Functions and Operators 函数和运算 - Network Address
网络数据类型的函数和运算。使用的不会太多,但是功能比较全。 Operator Description Example < is less than 小于 inet '192.168.1.5' < inet '192.168.1.6' <= ...原创 2018-08-06 07:46:26 · 166 阅读 · 0 评论 -
Postgresql - Functions and Operators 函数和运算 - System Information
系统信息函数。包括了会话信息函数,访问权限函数,schema可用性函数,系统catalog信息函数,对象信息和地址函数,注释信息函数,快照信息,提交事务信息,控制数据等。 Name Return Type Description current_catalog name ...原创 2018-08-08 17:46:08 · 309 阅读 · 0 评论 -
Postgresql - Functions and Operators 函数和运算 - String
对字符串的函数和运算。在平时应用中超级有用! Function Return Type Description Example Result string || string text 字符串连接 'Post' ||...原创 2018-08-03 11:20:49 · 223 阅读 · 0 评论 -
Postgresql - Functions and Operators 函数和运算 - Mathematical
数学函数,运算。 Operator Description Example Result + 加法 2 + 3 5 - 减法 2 - 3 -1 ...原创 2018-08-03 11:18:55 · 1041 阅读 · 0 评论 -
Postgresql - Functions and Operators 函数和运算 - Comparson
比较函数,运算包括大于,小于,等于,大于等于,小于等于,不等于。 Operator Description < less than > greater than <= less than or equal to ...原创 2018-08-03 11:16:17 · 178 阅读 · 0 评论 -
Postgresql - Functions and Operators 函数和运算 - JSON
json数据相关的函数和计算。越来越的人喜欢直接把json数据存入数据库,各个数据库也都在支持json类型,所以对于json相关的函数和运算应该掌握了解。 Operator Right Operand Type Description Example Example Result ...原创 2018-08-06 15:06:10 · 253 阅读 · 0 评论 -
Postgresql - Functions and Operators 函数和运算 - Sequence Manipulation
对序列的操作 Function Return Type Description currval(regclass) bigint 最近使用NEXVALL获得的返回值为指定序列 lastval() bigint 查询最近...原创 2018-08-06 15:07:02 · 130 阅读 · 0 评论 -
Postgresql - Functions and Operators 函数和运算 - Array
数组的函数和运算。数组运算和其他类型大致相同,只是数据类型变换了。有一些数组特定的函数,稍作了解。 Operator Description Example Result = equal 等于 ARRAY[1.1,2.1,3.1]::int[] = ARRAY...原创 2018-08-06 16:10:00 · 306 阅读 · 0 评论 -
Postgresql - Functions and Operators 函数和运算 - Range
区间范围的函数和运算。 Operator Description Example Result = equal 等于 int4range(1,5) = '[1,4]'::int4range t <> ...原创 2018-08-06 18:06:37 · 437 阅读 · 0 评论 -
Postgresql - Functions and Operators 函数和运算 - Aggregate
聚合函数。包括了很多数学上的函数公式。非常方便。 Function Argument Type(s) Return Type Partial Mode Description array_agg(expression) any non-array type ...原创 2018-08-06 22:12:15 · 393 阅读 · 0 评论 -
Postgresql - Functions and Operators 函数和运算 - Window Function
窗口函数。 Function Return Type Description row_number() bigint 在其分区内的当前行数,从1计数 rank() bigint 具有间隙的当前行的秩;与其第一对等点的行...原创 2018-08-06 22:24:52 · 153 阅读 · 0 评论 -
Postgresql - Functions and Operators 函数和运算 - Set Returning
可能返回不止一行的函数。 Function Argument Type Return Type Description generate_series(start,stop) int, bigint or numeric setof int, setof bi...原创 2018-08-06 22:31:10 · 226 阅读 · 0 评论 -
Postgresql - Functions and Operators 函数和运算 - Logical Operators
函数和运算,是SQL中的重要组成,可以对数据做简单或复杂的运算,非常的有用。当掌握了这些之后,对于写SQL有着莫大的帮助。每个数据库都有自己的函数和运算,所以这里有些是PG独有的,有些是标准SQL中通用的,通用的直接可以使用在其他数据库中。在psql命令行中,使用\df和\do可以列出目前数据库中可用的函数和运算符。本系列是依据官网 PG 10的文档总结的,在总结的同时自己也在学习。...原创 2018-08-03 11:11:34 · 253 阅读 · 0 评论 -
Postgresql - Functions and Operators 函数和运算 - System Administration
系统管理函数。包括配置设置函数,服务信号函数,备份控制函数,恢复控制函数,快照同步函数,流复制函数,数据库对象管理函数,索引维护函数,通用文件访问函数,advisory锁定。 Name Return Type Description current_setting(setting_name [, missing_ok ]...原创 2018-08-08 17:50:10 · 255 阅读 · 0 评论