PostgreSQL 文档检索
PG 18 · 按类别浏览,或输入名称与关键词
分类索引1772
random_gaussianrandom_gaussian ( lb, ub, parameter ) → integer 计算[lb, ub]中的高斯分布随机整数,详见下文。 random_gaussian(1, 10, 2.5) → 介于1和10之间的整数pgbench › 注解 › 内置函数
random_normal从具有给定参数的正态分布中返回一个随机值;mean默认为 0.0,stddev默认为 1.0。
Returns a random value from the normal distribution with the given parameters; mean defaults to 0.0 and stddev defaults to 1.0
random_normal (…函数 · 数学函数和操作符
random_zipfianrandom_zipfian ( lb, ub, parameter ) → integer 计算[lb, ub]中的 Zipfian 分布随机整数,详见下文。 random_zipfian(1, 10, 1.5) → 介于1和10之间的整数pgbench › 注解 › 内置函数
range_agg计算非空输入值的并集。
Computes the union of the non-null input values.
range_agg ( value anyrange ) → anymultirange
range_agg ( value anymultirange ) → anymultirange
聚合函数函数 · 聚合函数
range_intersect_agg计算非空输入值的交集。
Computes the intersection of the non-null input values.
range_intersect_agg ( value anyrange ) → anyrange
range_intersect_agg ( value anymultirange ) → anymultirange
聚合函数函数 · 聚合函数
range_merge计算包含两个给定范围的最小范围。
Computes the smallest range that includes both of the given ranges.
range_merge ( anyrange, anyrange ) → anyrange
range_merge ( anymultirange ) → anyrange
范围/多范围函数和操作符函数 · 范围/多范围函数和操作符
range_minus_multi返回从第一个范围中减去第二个范围后剩下的非空范围。
Returns the non-empty range(s) remaining after subtracting the second range from the first.
range_minus_multi ( anyrange, anyrange ) → setof anyrange
范围/多范围函数和操作符函数 · 范围/多范围函数和操作符
rank计算假想行的排名,允许空缺;即该行所属同等行组中第一行的行号。
Computes the rank of the hypothetical row, with gaps; that is, the row number of the first row in its peer group.
rank ( args ) WITHIN GROUP ( ORDER BY sorted…函数 · 聚合函数
regexp_count返回 POSIX 正则表达式pattern在string中匹配的次数;参见第 9.7.3.1.2 节。
Returns the number of times the POSIX regular expression pattern matches in the string; see Section 9.7.3.1.2.
regexp_count ( string text,…函数 · 字符串函数和操作符
regexp_instr返回 POSIX 正则表达式pattern在string中第N次匹配的位置;如果没有这样的匹配,则返回零。
Returns the position within string where the N'th match of the POSIX regular expression pattern occurs, or zero if there is no such matc…函数 · 字符串函数和操作符
regexp_like检查 POSIX 正则表达式pattern是否在string中出现;参见第 9.7.3.1.4 节。
Checks whether a match of the POSIX regular expression pattern occurs within string; see Section 9.7.3.1.4.
regexp_like ( string text, patt…函数 · 字符串函数和操作符
regexp_match返回 POSIX 正则表达式pattern与string的第一次匹配中的子字符串;参见第 9.7.3.1.5 节。
Returns substrings within the first match of the POSIX regular expression pattern to the string; see Section 9.7.3.1.5.
regexp_match…函数 · 字符串函数和操作符
regexp_matches返回 POSIX 正则表达式pattern与string的第一次匹配中的子字符串;如果使用g标志,则返回所有匹配中的子字符串。
Returns substrings within the first match of the POSIX regular expression pattern to the string, or substrings within all such…函数 · 字符串函数和操作符
regexp_replace替换第一个与 POSIX 正则表达式pattern匹配的子字符串,如果使用了g标志,则替换所有这样的匹配;参见第 9.7.3.1.7 节。
Replaces the substring that is the first match to the POSIX regular expression pattern, or all such matches if the g fla…函数 · 字符串函数和操作符
regexp_split_to_array使用POSIX正则表达式作为分隔符拆分string,生成一个结果的数组;参见第 9.7.3.1.9 节。
Splits string using a POSIX regular expression as the delimiter, producing an array of results; see Section 9.7.3.1.9.
regexp_split_to_ar…函数 · 字符串函数和操作符
regexp_split_to_table使用POSIX正则表达式作为分隔符拆分string,生成一组结果;参见第 9.7.3.1.8 节。
Splits string using a POSIX regular expression as the delimiter, producing a set of results; see Section 9.7.3.1.8.
regexp_split_to_table ( …函数 · 字符串函数和操作符
regexp_substr返回string中 POSIX 正则表达式pattern的第N次匹配对应的子字符串;如果没有这样的匹配,则返回NULL。
Returns the substring within string that matches the N'th occurrence of the POSIX regular expression pattern, or NULL if there is…函数 · 字符串函数和操作符
regr_avgx计算自变量的平均值,即sum(X)/N。
Computes the average of the independent variable, sum(X)/N.
regr_avgx ( Y double precision, X double precision ) → double precision
聚合函数函数 · 聚合函数
regr_avgy计算因变量的平均值,即sum(Y)/N。
Computes the average of the dependent variable, sum(Y)/N.
regr_avgy ( Y double precision, X double precision ) → double precision
聚合函数函数 · 聚合函数
regr_count计算两个输入都非空的行数。
Computes the number of rows in which both inputs are non-null.
regr_count ( Y double precision, X double precision ) → bigint
聚合函数函数 · 聚合函数
regr_intercept计算由(X,Y)数值对确定的最小二乘拟合线性方程的 y 轴截距。
Computes the y-intercept of the least-squares-fit linear equation determined by the (X, Y) pairs.
regr_intercept ( Y double precision, X double precision ) →…函数 · 聚合函数
regr_r2计算相关系数的平方。
Computes the square of the correlation coefficient.
regr_r2 ( Y double precision, X double precision ) → double precision
聚合函数函数 · 聚合函数
regr_slope计算由(X,Y)数值对确定的最小二乘拟合线性方程的斜率。
Computes the slope of the least-squares-fit linear equation determined by the (X, Y) pairs.
regr_slope ( Y double precision, X double precision ) → double precis…函数 · 聚合函数
regr_sxx计算自变量的“平方和”,即sum(X^2) - sum(X)^2/N。
Computes the “sum of squares” of the independent variable, sum(X^2) - sum(X)^2/N.
regr_sxx ( Y double precision, X double precision ) → double precision
聚…函数 · 聚合函数
regr_sxy计算自变量与因变量的“乘积和”,即sum(X*Y) - sum(X) * sum(Y)/N。
Computes the “sum of products” of independent times dependent variables, sum(X*Y) - sum(X) * sum(Y)/N.
regr_sxy ( Y double precision, X double …函数 · 聚合函数
regr_syy计算因变量的“平方和”,即sum(Y^2) - sum(Y)^2/N。
Computes the “sum of squares” of the dependent variable, sum(Y^2) - sum(Y)^2/N.
regr_syy ( Y double precision, X double precision ) → double precision
聚合函…函数 · 聚合函数
repeat按number指定的次数重复string。
Repeats string the specified number of times.
repeat ( string text, number integer ) → text
字符串函数和操作符函数 · 字符串函数和操作符
replace将string中所有出现的子字符串from替换为子字符串to。
Replaces all occurrences in string of substring from with substring to.
replace ( string text, from text, to text ) → text
字符串函数和操作符函数 · 字符串函数和操作符
reverse颠倒字符串中字符的顺序。
Reverses the order of the characters in the string.
reverse ( text ) → text
reverse ( bytea ) → bytea
字符串函数和操作符函数 · 字符串函数和操作符
right返回字符串中的最后n个字符;如果n为负数,则返回除前 |n| 个字符之外的全部字符。
Returns last n characters in the string, or when n is negative, returns all but first |n| characters.
right ( string text, n integer ) → text
字符串函数…函数 · 字符串函数和操作符
round舍入到最接近的整数。
Rounds to nearest integer.
round ( numeric ) → numeric
round ( double precision ) → double precision
round ( v numeric, s integer ) → numeric
数学函数和操作符函数 · 数学函数和操作符
row_number返回当前行在其分区内的编号,从 1 开始计数。
Returns the number of the current row within its partition, counting from 1.
row_number () → bigint
窗口函数函数 · 窗口函数
row_security_active在当前用户和当前环境的上下文中,指定表的行级安全是否生效?
Is row-level security active for the specified table in the context of the current user and current environment?
row_security_active ( table text or oid ) → boo…函数 · 系统信息函数和操作符
row_to_json将SQL 复合值转换为JSON对象。
Converts an SQL composite value to a JSON object.
row_to_json ( record [, boolean] ) → json
JSON 函数和操作符函数 · JSON 函数和操作符
rpad在string后面追加字符fill(默认为空格),将其填充到长度length。
Extends the string to length length by appending the characters fill (a space by default).
rpad ( string text, length integer [, fill text] ) → text
字…函数 · 字符串函数和操作符
rtrim从string的结尾移除仅由characters中字符(默认为空格)组成的最长字符串。
Removes the longest string containing only characters in characters (a space by default) from the end of string.
rtrim ( string text [, characters…函数 · 字符串函数和操作符
scale参数的小数位数(小数部分的十进制位数)
Scale of the argument (the number of decimal digits in the fractional part)
scale ( numeric ) → integer
数学函数和操作符函数 · 数学函数和操作符
schema_to_xml这些函数会忽略当前用户不可读的表。
These functions ignore tables that are not readable by the current user.
schema_to_xml ( schema name, nulls boolean, tableforest boolean, targetns text ) → xml
XML 函数函数 · XML 函数
schema_to_xml_and_xmlschema这些函数会忽略当前用户不可读的表。
These functions ignore tables that are not readable by the current user.
schema_to_xml_and_xmlschema ( schema name, nulls boolean, tableforest boolean, targetns text ) → xm…函数 · XML 函数
schema_to_xmlschema这些函数会忽略当前用户不可读的表。
These functions ignore tables that are not readable by the current user.
schema_to_xmlschema ( schema name, nulls boolean, tableforest boolean, targetns text ) → xml
XML 函数函数 · XML 函数
更多结果
输入名称或关键词,从 PostgreSQL 手册与扩展目录中直接找到定义。
pg17: 限定版本 ex: 只搜扩展 ↑↓ 选择 ↵ 打开