↑↓ 选择↵ 打开⌫ 切换范围完整搜索

PG.CENTER 连接 PostgreSQL 文档、百科与生态知识。由 Pigsty 维护。

Wiki / 数据类型

text

variable-length character string

当前阅读 PG 18·选择有来源记录的版本

此版本暂无所选语言的定义,以下显示原始英文内容。

Catalog name
pg_catalog.text
Type OID
25
Type kind
Base type
Declared length
Variable length (varlena)
Storage strategy
extended
Input function
textin
Output function
textout
Documented declaration
text
Manual description
variable unlimited length
aliases
未知
coverage
source inventory; exact declared input types for operator classes
manual documentation
dedicated family chapter
manual path
datatype-character.html
ranges
未知
signature
text

版本定义 PG 18

8.3. Character Types

Table 8.4. Character Types

Name Description
character varying(n), varchar(n) variable-length with limit
character(n), char(n), bpchar(n) fixed-length, blank-padded
bpchar variable unlimited length, blank-trimmed
text variable unlimited length

Table 8.4 shows the general-purpose character types available in PostgreSQL.

SQL defines two primary character types: character varying(n) and character(n), where n is a positive integer. Both of these types can store strings up to n characters (not bytes) in length. An attempt to store a longer string into a column of these types will result in an error, unless the excess characters are all spaces, in which case the string will be truncated to the maximum length. (This somewhat bizarre exception is required by the SQL standard.) However, if one explicitly casts a value to character varying(n) or character(n), then an over-length value will be truncated to n characters without raising an error. (This too is required by the SQL standard.) If the string to be stored is shorter than the declared length, values of type character will be space-padded; values of type character varying will simply store the shorter string.

In addition, PostgreSQL provides the text type, which stores strings of any length. Although the text type is not in the SQL standard, several other SQL database management systems have it as well. text is PostgreSQL's native string data type, in that most built-in functions operating on strings are declared to take or return text not character varying. For many purposes, character varying acts as though it were a domain over text.

The type name varchar is an alias for character varying, while bpchar (with length specifier) and char are aliases for character. The varchar and char aliases are defined in the SQL standard; bpchar is a PostgreSQL extension.

If specified, the length n must be greater than zero and cannot exceed 10,485,760. If character varying (or varchar) is used without length specifier, the type accepts strings of any length. If bpchar lacks a length specifier, it also accepts strings of any length, but trailing spaces are semantically insignificant. If character (or char) lacks a specifier, it is equivalent to character(1).

Values of type character are physically padded with spaces to the specified width n, and are stored and displayed that way. However, trailing spaces are treated as semantically insignificant and disregarded when comparing two values of type character. In collations where whitespace is significant, this behavior can produce unexpected results; for example SELECT 'a '::CHAR(2) collate "C" < E'a\n'::CHAR(2) returns true, even though C locale would consider a space to be greater than a newline. Trailing spaces are removed when converting a character value to one of the other string types. Note that trailing spaces are semantically significant in character varying and text values, and when using pattern matching, that is LIKE and regular expressions.

The characters that can be stored in any of these data types are determined by the database character set, which is selected when the database is created. Regardless of the specific character set, the character with code zero (sometimes called NUL) cannot be stored. For more information refer to Section 23.3.

The storage requirement for a short string (up to 126 bytes) is 1 byte plus the actual string, which includes the space padding in the case of character. Longer strings have 4 bytes of overhead instead of 1. Long strings are compressed by the system automatically, so the physical requirement on disk might be less. Very long values are also stored in background tables so that they do not interfere with rapid access to shorter column values. In any case, the longest possible character string that can be stored is about 1 GB. (The maximum value that will be allowed for n in the data type declaration is less than that. It wouldn't be useful to change this because with multibyte character encodings the number of characters and bytes can be quite different. If you desire to store long strings with no specific upper limit, use text or character varying without a length specifier, rather than making up an arbitrary length limit.)

Tip

There is no performance difference among these three types, apart from increased storage space when using the blank-padded type, and a few extra CPU cycles to check the length when storing into a length-constrained column. While character(n) has performance advantages in some other database systems, there is no such advantage in PostgreSQL; in fact character(n) is usually the slowest of the three because of its additional storage costs. In most situations text or character varying should be used instead.

Refer to Section 4.1.2.1 for information about the syntax of string literals, and to Chapter 9 for information about available operators and functions.

Example 8.1. Using the Character Types

CREATE TABLE test1 (a character(4));
INSERT INTO test1 VALUES ('ok');
SELECT a, char_length(a) FROM test1; -- (1)

  a   | char_length
------+-------------
 ok   |           2


CREATE TABLE test2 (b varchar(5));
INSERT INTO test2 VALUES ('ok');
INSERT INTO test2 VALUES ('good      ');
INSERT INTO test2 VALUES ('too long');
ERROR:  value too long for type character varying(5)
INSERT INTO test2 VALUES ('too long'::varchar(5)); -- explicit truncation
SELECT b, char_length(b) FROM test2;

   b   | char_length
-------+-------------
 ok    |           2
 good  |           5
 too l |           5

(1)

The char_length function is discussed in Section 9.4.


There are two other fixed-length character types in PostgreSQL, shown in Table 8.5. These are not intended for general-purpose use, only for use in the internal system catalogs. The name type is used to store identifiers. Its length is currently defined as 64 bytes (63 usable characters plus terminator) but should be referenced using the constant NAMEDATALEN in C source code. The length is set at compile time (and is therefore adjustable for special uses); the default maximum length might change in a future release. The type "char" (note the quotes) is different from char(1) in that it only uses one byte of storage, and therefore can store only a single ASCII character. It is used in the system catalogs as a simplistic enumeration type.

Table 8.5. Special Character Types

Name Storage Size Description
"char" 1 byte single-byte internal type
name 64 bytes internal type for object names

比较版本

完整来源事实

casts

map[castcontext:i castfunc:regclass castmethod:f castsource:text casttarget:regclass], map[castcontext:i castfunc:0 castmethod:b castsource:text casttarget:bpchar], map[castcontext:i castfunc:0 castmethod:b castsource:text casttarget:varchar], map[castcontext:i castfunc:text(bpchar) castmethod:f castsource:bpchar casttarget:text], map[castcontext:i castfunc:0 castmethod:b castsource:varchar casttarget:text], map[castcontext:i castfunc:text(char) castmethod:f castsource:char casttarget:text], map[castcontext:i castfunc:text(name) castmethod:f castsource:name casttarget:text], map[castcontext:a castfunc:char(text) castmethod:f castsource:text casttarget:char], map[castcontext:i castfunc:name(text) castmethod:f castsource:text casttarget:name], map[castcontext:i castfunc:0 castmethod:b castsource:pg_node_tree casttarget:text], map[castcontext:i castfunc:0 castmethod:i castsource:pg_ndistinct casttarget:text], map[castcontext:i castfunc:0 castmethod:i castsource:pg_dependencies casttarget:text], map[castcontext:i castfunc:0 castmethod:i castsource:pg_mcv_list casttarget:text], map[castcontext:a castfunc:text(inet) castmethod:f castsource:cidr casttarget:text], map[castcontext:a castfunc:text(inet) castmethod:f castsource:inet casttarget:text], map[castcontext:a castfunc:text(bool) castmethod:f castsource:bool casttarget:text], map[castcontext:a castfunc:0 castmethod:b castsource:xml casttarget:text], map[castcontext:e castfunc:xml castmethod:f castsource:text casttarget:xml]

catalog

{"array_type_name":"_text","array_type_oid":"1009","descr":"variable-length string, no limit specified","oid":"25","typacl":"_null_","typalign":"i","typanalyze":"-","typarray":"0","typbasetype":"0","typbyval":"f","typcategory":"S","typcollation":"default","typdefault":"_null_","typdefaultbin":"_null_","typdelim":"','","typelem":"0","typinput":"textin","typisdefined":"t","typispreferred":"t","typlen":"-1","typmodin":"-","typmodout":"-","typname":"text","typnamespace":"pg_catalog","typndims":"0","typnotnull":"f","typoutput":"textout","typowner":"POSTGRES","typreceive":"textrecv","typrelid":"0","typsend":"textsend","typstorage":"x","typsubscript":"-","typtype":"b","typtypmod":"-1"}

operator classes

map[oid:3126 oid_symbol:TEXT_BTREE_OPS_OID opcdefault:t opcfamily:btree/text_ops opcintype:text opckeytype:0 opcmethod:btree opcname:text_ops opcnamespace:pg_catalog opcowner:POSTGRES], map[opcdefault:t opcfamily:hash/text_ops opcintype:text opckeytype:0 opcmethod:hash opcname:text_ops opcnamespace:pg_catalog opcowner:POSTGRES], map[opcdefault:f opcfamily:btree/text_ops opcintype:text opckeytype:0 opcmethod:btree opcname:varchar_ops opcnamespace:pg_catalog opcowner:POSTGRES], map[opcdefault:f opcfamily:hash/text_ops opcintype:text opckeytype:0 opcmethod:hash opcname:varchar_ops opcnamespace:pg_catalog opcowner:POSTGRES], map[oid:4217 oid_symbol:TEXT_BTREE_PATTERN_OPS_OID opcdefault:f opcfamily:btree/text_pattern_ops opcintype:text opckeytype:0 opcmethod:btree opcname:text_pattern_ops opcnamespace:pg_catalog opcowner:POSTGRES], map[oid:4218 oid_symbol:VARCHAR_BTREE_PATTERN_OPS_OID opcdefault:f opcfamily:btree/text_pattern_ops opcintype:text opckeytype:0 opcmethod:btree opcname:varchar_pattern_ops opcnamespace:pg_catalog opcowner:POSTGRES], map[opcdefault:f opcfamily:hash/text_pattern_ops opcintype:text opckeytype:0 opcmethod:hash opcname:text_pattern_ops opcnamespace:pg_catalog opcowner:POSTGRES], map[opcdefault:f opcfamily:hash/text_pattern_ops opcintype:text opckeytype:0 opcmethod:hash opcname:varchar_pattern_ops opcnamespace:pg_catalog opcowner:POSTGRES], map[opcdefault:t opcfamily:spgist/text_ops opcintype:text opckeytype:0 opcmethod:spgist opcname:text_ops opcnamespace:pg_catalog opcowner:POSTGRES], map[opcdefault:t opcfamily:brin/text_minmax_ops opcintype:text opckeytype:text opcmethod:brin opcname:text_minmax_ops opcnamespace:pg_catalog opcowner:POSTGRES], map[opcdefault:f opcfamily:brin/text_bloom_ops opcintype:text opckeytype:text opcmethod:brin opcname:text_bloom_ops opcnamespace:pg_catalog opcowner:POSTGRES]

operators

map[descr:equal oid:98 oid_symbol:TextEqualOperator oprcanhash:t oprcanmerge:t oprcode:texteq oprcom:=(text,text) oprjoin:eqjoinsel oprkind:b oprleft:text oprname:= oprnamespace:pg_catalog oprnegate:<>(text,text) oprowner:POSTGRES oprrest:eqsel oprresult:bool oprright:text], map[descr:starts with oid:3877 oid_symbol:TextPrefixOperator oprcanhash:f oprcanmerge:f oprcode:starts_with oprcom:0 oprjoin:prefixjoinsel oprkind:b oprleft:text oprname:^@ oprnamespace:pg_catalog oprnegate:0 oprowner:POSTGRES oprrest:prefixsel oprresult:bool oprright:text], map[descr:equal oid:254 oid_symbol:NameEqualTextOperator oprcanhash:t oprcanmerge:t oprcode:nameeqtext oprcom:=(text,name) oprjoin:eqjoinsel oprkind:b oprleft:name oprname:= oprnamespace:pg_catalog oprnegate:<>(name,text) oprowner:POSTGRES oprrest:eqsel oprresult:bool oprright:text], map[descr:less than oid:255 oid_symbol:NameLessTextOperator oprcanhash:f oprcanmerge:f oprcode:namelttext oprcom:>(text,name) oprjoin:scalarltjoinsel oprkind:b oprleft:name oprname:< oprnamespace:pg_catalog oprnegate:>=(name,text) oprowner:POSTGRES oprrest:scalarltsel oprresult:bool oprright:text], map[descr:less than or equal oid:256 oprcanhash:f oprcanmerge:f oprcode:nameletext oprcom:>=(text,name) oprjoin:scalarlejoinsel oprkind:b oprleft:name oprname:<= oprnamespace:pg_catalog oprnegate:>(name,text) oprowner:POSTGRES oprrest:scalarlesel oprresult:bool oprright:text], map[descr:greater than or equal oid:257 oid_symbol:NameGreaterEqualTextOperator oprcanhash:f oprcanmerge:f oprcode:namegetext oprcom:<=(text,name) oprjoin:scalargejoinsel oprkind:b oprleft:name oprname:>= oprnamespace:pg_catalog oprnegate:<(name,text) oprowner:POSTGRES oprrest:scalargesel oprresult:bool oprright:text], map[descr:greater than oid:258 oprcanhash:f oprcanmerge:f oprcode:namegttext oprcom:<(text,name) oprjoin:scalargtjoinsel oprkind:b oprleft:name oprname:> oprnamespace:pg_catalog oprnegate:<=(name,text) oprowner:POSTGRES oprrest:scalargtsel oprresult:bool oprright:text], map[descr:not equal oid:259 oprcanhash:f oprcanmerge:f oprcode:namenetext oprcom:<>(text,name) oprjoin:neqjoinsel oprkind:b oprleft:name oprname:<> oprnamespace:pg_catalog oprnegate:=(name,text) oprowner:POSTGRES oprrest:neqsel oprresult:bool oprright:text], map[descr:equal oid:260 oprcanhash:t oprcanmerge:t oprcode:texteqname oprcom:=(name,text) oprjoin:eqjoinsel oprkind:b oprleft:text oprname:= oprnamespace:pg_catalog oprnegate:<>(text,name) oprowner:POSTGRES oprrest:eqsel oprresult:bool oprright:name], map[descr:less than oid:261 oprcanhash:f oprcanmerge:f oprcode:textltname oprcom:>(name,text) oprjoin:scalarltjoinsel oprkind:b oprleft:text oprname:< oprnamespace:pg_catalog oprnegate:>=(text,name) oprowner:POSTGRES oprrest:scalarltsel oprresult:bool oprright:name], map[descr:less than or equal oid:262 oprcanhash:f oprcanmerge:f oprcode:textlename oprcom:>=(name,text) oprjoin:scalarlejoinsel oprkind:b oprleft:text oprname:<= oprnamespace:pg_catalog oprnegate:>(text,name) oprowner:POSTGRES oprrest:scalarlesel oprresult:bool oprright:name], map[descr:greater than or equal oid:263 oprcanhash:f oprcanmerge:f oprcode:textgename oprcom:<=(name,text) oprjoin:scalargejoinsel oprkind:b oprleft:text oprname:>= oprnamespace:pg_catalog oprnegate:<(text,name) oprowner:POSTGRES oprrest:scalargesel oprresult:bool oprright:name], map[descr:greater than oid:264 oprcanhash:f oprcanmerge:f oprcode:textgtname oprcom:<(name,text) oprjoin:scalargtjoinsel oprkind:b oprleft:text oprname:> oprnamespace:pg_catalog oprnegate:<=(text,name) oprowner:POSTGRES oprrest:scalargtsel oprresult:bool oprright:name], map[descr:not equal oid:265 oprcanhash:f oprcanmerge:f oprcode:textnename oprcom:<>(name,text) oprjoin:neqjoinsel oprkind:b oprleft:text oprname:<> oprnamespace:pg_catalog oprnegate:=(text,name) oprowner:POSTGRES oprrest:neqsel oprresult:bool oprright:name], map[descr:not equal oid:531 oprcanhash:f oprcanmerge:f oprcode:textne oprcom:<>(text,text) oprjoin:neqjoinsel oprkind:b oprleft:text oprname:<> oprnamespace:pg_catalog oprnegate:=(text,text) oprowner:POSTGRES oprrest:neqsel oprresult:bool oprright:text], map[descr:matches regular expression, case-sensitive oid:639 oid_symbol:OID_NAME_REGEXEQ_OP oprcanhash:f oprcanmerge:f oprcode:nameregexeq oprcom:0 oprjoin:regexeqjoinsel oprkind:b oprleft:name oprname:~ oprnamespace:pg_catalog oprnegate:!~(name,text) oprowner:POSTGRES oprrest:regexeqsel oprresult:bool oprright:text], map[descr:does not match regular expression, case-sensitive oid:640 oprcanhash:f oprcanmerge:f oprcode:nameregexne oprcom:0 oprjoin:regexnejoinsel oprkind:b oprleft:name oprname:!~ oprnamespace:pg_catalog oprnegate:~(name,text) oprowner:POSTGRES oprrest:regexnesel oprresult:bool oprright:text], map[descr:matches regular expression, case-sensitive oid:641 oid_symbol:OID_TEXT_REGEXEQ_OP oprcanhash:f oprcanmerge:f oprcode:textregexeq oprcom:0 oprjoin:regexeqjoinsel oprkind:b oprleft:text oprname:~ oprnamespace:pg_catalog oprnegate:!~(text,text) oprowner:POSTGRES oprrest:regexeqsel oprresult:bool oprright:text], map[descr:does not match regular expression, case-sensitive oid:642 oprcanhash:f oprcanmerge:f oprcode:textregexne oprcom:0 oprjoin:regexnejoinsel oprkind:b oprleft:text oprname:!~ oprnamespace:pg_catalog oprnegate:~(text,text) oprowner:POSTGRES oprrest:regexnesel oprresult:bool oprright:text], map[descr:concatenate oid:654 oprcanhash:f oprcanmerge:f oprcode:textcat oprcom:0 oprjoin:- oprkind:b oprleft:text oprname:|| oprnamespace:pg_catalog oprnegate:0 oprowner:POSTGRES oprrest:- oprresult:text oprright:text], map[descr:less than oid:664 oid_symbol:TextLessOperator oprcanhash:f oprcanmerge:f oprcode:text_lt oprcom:>(text,text) oprjoin:scalarltjoinsel oprkind:b oprleft:text oprname:< oprnamespace:pg_catalog oprnegate:>=(text,text) oprowner:POSTGRES oprrest:scalarltsel oprresult:bool oprright:text], map[descr:less than or equal oid:665 oprcanhash:f oprcanmerge:f oprcode:text_le oprcom:>=(text,text) oprjoin:scalarlejoinsel oprkind:b oprleft:text oprname:<= oprnamespace:pg_catalog oprnegate:>(text,text) oprowner:POSTGRES oprrest:scalarlesel oprresult:bool oprright:text], map[descr:greater than oid:666 oprcanhash:f oprcanmerge:f oprcode:text_gt oprcom:<(text,text) oprjoin:scalargtjoinsel oprkind:b oprleft:text oprname:> oprnamespace:pg_catalog oprnegate:<=(text,text) oprowner:POSTGRES oprrest:scalargtsel oprresult:bool oprright:text], map[descr:greater than or equal oid:667 oid_symbol:TextGreaterEqualOperator oprcanhash:f oprcanmerge:f oprcode:text_ge oprcom:<=(text,text) oprjoin:scalargejoinsel oprkind:b oprleft:text oprname:>= oprnamespace:pg_catalog oprnegate:<(text,text) oprowner:POSTGRES oprrest:scalargesel oprresult:bool oprright:text], map[descr:matches regular expression, case-sensitive oid:1055 oid_symbol:OID_BPCHAR_REGEXEQ_OP oprcanhash:f oprcanmerge:f oprcode:bpcharregexeq oprcom:0 oprjoin:regexeqjoinsel oprkind:b oprleft:bpchar oprname:~ oprnamespace:pg_catalog oprnegate:!~(bpchar,text) oprowner:POSTGRES oprrest:regexeqsel oprresult:bool oprright:text], map[descr:does not match regular expression, case-sensitive oid:1056 oprcanhash:f oprcanmerge:f oprcode:bpcharregexne oprcom:0 oprjoin:regexnejoinsel oprkind:b oprleft:bpchar oprname:!~ oprnamespace:pg_catalog oprnegate:~(bpchar,text) oprowner:POSTGRES oprrest:regexnesel oprresult:bool oprright:text], map[descr:matches LIKE expression oid:1207 oid_symbol:OID_NAME_LIKE_OP oprcanhash:f oprcanmerge:f oprcode:namelike oprcom:0 oprjoin:likejoinsel oprkind:b oprleft:name oprname:~~ oprnamespace:pg_catalog oprnegate:!~~(name,text) oprowner:POSTGRES oprrest:likesel oprresult:bool oprright:text], map[descr:does not match LIKE expression oid:1208 oprcanhash:f oprcanmerge:f oprcode:namenlike oprcom:0 oprjoin:nlikejoinsel oprkind:b oprleft:name oprname:!~~ oprnamespace:pg_catalog oprnegate:~~(name,text) oprowner:POSTGRES oprrest:nlikesel oprresult:bool oprright:text], map[descr:matches LIKE expression oid:1209 oid_symbol:OID_TEXT_LIKE_OP oprcanhash:f oprcanmerge:f oprcode:textlike oprcom:0 oprjoin:likejoinsel oprkind:b oprleft:text oprname:~~ oprnamespace:pg_catalog oprnegate:!~~(text,text) oprowner:POSTGRES oprrest:likesel oprresult:bool oprright:text], map[descr:does not match LIKE expression oid:1210 oprcanhash:f oprcanmerge:f oprcode:textnlike oprcom:0 oprjoin:nlikejoinsel oprkind:b oprleft:text oprname:!~~ oprnamespace:pg_catalog oprnegate:~~(text,text) oprowner:POSTGRES oprrest:nlikesel oprresult:bool oprright:text], map[descr:matches LIKE expression oid:1211 oid_symbol:OID_BPCHAR_LIKE_OP oprcanhash:f oprcanmerge:f oprcode:bpcharlike oprcom:0 oprjoin:likejoinsel oprkind:b oprleft:bpchar oprname:~~ oprnamespace:pg_catalog oprnegate:!~~(bpchar,text) oprowner:POSTGRES oprrest:likesel oprresult:bool oprright:text], map[descr:does not match LIKE expression oid:1212 oprcanhash:f oprcanmerge:f oprcode:bpcharnlike oprcom:0 oprjoin:nlikejoinsel oprkind:b oprleft:bpchar oprname:!~~ oprnamespace:pg_catalog oprnegate:~~(bpchar,text) oprowner:POSTGRES oprrest:nlikesel oprresult:bool oprright:text], map[descr:matches regular expression, case-insensitive oid:1226 oid_symbol:OID_NAME_ICREGEXEQ_OP oprcanhash:f oprcanmerge:f oprcode:nameicregexeq oprcom:0 oprjoin:icregexeqjoinsel oprkind:b oprleft:name oprname:~* oprnamespace:pg_catalog oprnegate:!~*(name,text) oprowner:POSTGRES oprrest:icregexeqsel oprresult:bool oprright:text], map[descr:does not match regular expression, case-insensitive oid:1227 oprcanhash:f oprcanmerge:f oprcode:nameicregexne oprcom:0 oprjoin:icregexnejoinsel oprkind:b oprleft:name oprname:!~* oprnamespace:pg_catalog oprnegate:~*(name,text) oprowner:POSTGRES oprrest:icregexnesel oprresult:bool oprright:text], map[descr:matches regular expression, case-insensitive oid:1228 oid_symbol:OID_TEXT_ICREGEXEQ_OP oprcanhash:f oprcanmerge:f oprcode:texticregexeq oprcom:0 oprjoin:icregexeqjoinsel oprkind:b oprleft:text oprname:~* oprnamespace:pg_catalog oprnegate:!~*(text,text) oprowner:POSTGRES oprrest:icregexeqsel oprresult:bool oprright:text], map[descr:does not match regular expression, case-insensitive oid:1229 oprcanhash:f oprcanmerge:f oprcode:texticregexne oprcom:0 oprjoin:icregexnejoinsel oprkind:b oprleft:text oprname:!~* oprnamespace:pg_catalog oprnegate:~*(text,text) oprowner:POSTGRES oprrest:icregexnesel oprresult:bool oprright:text], map[descr:matches regular expression, case-insensitive oid:1234 oid_symbol:OID_BPCHAR_ICREGEXEQ_OP oprcanhash:f oprcanmerge:f oprcode:bpcharicregexeq oprcom:0 oprjoin:icregexeqjoinsel oprkind:b oprleft:bpchar oprname:~* oprnamespace:pg_catalog oprnegate:!~*(bpchar,text) oprowner:POSTGRES oprrest:icregexeqsel oprresult:bool oprright:text], map[descr:does not match regular expression, case-insensitive oid:1235 oprcanhash:f oprcanmerge:f oprcode:bpcharicregexne oprcom:0 oprjoin:icregexnejoinsel oprkind:b oprleft:bpchar oprname:!~* oprnamespace:pg_catalog oprnegate:~*(bpchar,text) oprowner:POSTGRES oprrest:icregexnesel oprresult:bool oprright:text], map[descr:matches LIKE expression, case-insensitive oid:1625 oid_symbol:OID_NAME_ICLIKE_OP oprcanhash:f oprcanmerge:f oprcode:nameiclike oprcom:0 oprjoin:iclikejoinsel oprkind:b oprleft:name oprname:~~* oprnamespace:pg_catalog oprnegate:!~~*(name,text) oprowner:POSTGRES oprrest:iclikesel oprresult:bool oprright:text], map[descr:does not match LIKE expression, case-insensitive oid:1626 oprcanhash:f oprcanmerge:f oprcode:nameicnlike oprcom:0 oprjoin:icnlikejoinsel oprkind:b oprleft:name oprname:!~~* oprnamespace:pg_catalog oprnegate:~~*(name,text) oprowner:POSTGRES oprrest:icnlikesel oprresult:bool oprright:text], map[descr:matches LIKE expression, case-insensitive oid:1627 oid_symbol:OID_TEXT_ICLIKE_OP oprcanhash:f oprcanmerge:f oprcode:texticlike oprcom:0 oprjoin:iclikejoinsel oprkind:b oprleft:text oprname:~~* oprnamespace:pg_catalog oprnegate:!~~*(text,text) oprowner:POSTGRES oprrest:iclikesel oprresult:bool oprright:text], map[descr:does not match LIKE expression, case-insensitive oid:1628 oprcanhash:f oprcanmerge:f oprcode:texticnlike oprcom:0 oprjoin:icnlikejoinsel oprkind:b oprleft:text oprname:!~~* oprnamespace:pg_catalog oprnegate:~~*(text,text) oprowner:POSTGRES oprrest:icnlikesel oprresult:bool oprright:text], map[descr:matches LIKE expression, case-insensitive oid:1629 oid_symbol:OID_BPCHAR_ICLIKE_OP oprcanhash:f oprcanmerge:f oprcode:bpchariclike oprcom:0 oprjoin:iclikejoinsel oprkind:b oprleft:bpchar oprname:~~* oprnamespace:pg_catalog oprnegate:!~~*(bpchar,text) oprowner:POSTGRES oprrest:iclikesel oprresult:bool oprright:text], map[descr:does not match LIKE expression, case-insensitive oid:1630 oprcanhash:f oprcanmerge:f oprcode:bpcharicnlike oprcom:0 oprjoin:icnlikejoinsel oprkind:b oprleft:bpchar oprname:!~~* oprnamespace:pg_catalog oprnegate:~~*(bpchar,text) oprowner:POSTGRES oprrest:icnlikesel oprresult:bool oprright:text], map[descr:less than oid:2314 oid_symbol:TextPatternLessOperator oprcanhash:f oprcanmerge:f oprcode:text_pattern_lt oprcom:~>~(text,text) oprjoin:scalarltjoinsel oprkind:b oprleft:text oprname:~<~ oprnamespace:pg_catalog oprnegate:~>=~(text,text) oprowner:POSTGRES oprrest:scalarltsel oprresult:bool oprright:text], map[descr:less than or equal oid:2315 oprcanhash:f oprcanmerge:f oprcode:text_pattern_le oprcom:~>=~(text,text) oprjoin:scalarlejoinsel oprkind:b oprleft:text oprname:~<=~ oprnamespace:pg_catalog oprnegate:~>~(text,text) oprowner:POSTGRES oprrest:scalarlesel oprresult:bool oprright:text], map[descr:greater than or equal oid:2317 oid_symbol:TextPatternGreaterEqualOperator oprcanhash:f oprcanmerge:f oprcode:text_pattern_ge oprcom:~<=~(text,text) oprjoin:scalargejoinsel oprkind:b oprleft:text oprname:~>=~ oprnamespace:pg_catalog oprnegate:~<~(text,text) oprowner:POSTGRES oprrest:scalargesel oprresult:bool oprright:text], map[descr:greater than oid:2318 oprcanhash:f oprcanmerge:f oprcode:text_pattern_gt oprcom:~<~(text,text) oprjoin:scalargtjoinsel oprkind:b oprleft:text oprname:~>~ oprnamespace:pg_catalog oprnegate:~<=~(text,text) oprowner:POSTGRES oprrest:scalargtsel oprresult:bool oprright:text], map[descr:concatenate oid:2779 oprcanhash:f oprcanmerge:f oprcode:textanycat oprcom:0 oprjoin:- oprkind:b oprleft:text oprname:|| oprnamespace:pg_catalog oprnegate:0 oprowner:POSTGRES oprrest:- oprresult:text oprright:anynonarray], map[descr:concatenate oid:2780 oprcanhash:f oprcanmerge:f oprcode:anytextcat oprcom:0 oprjoin:- oprkind:b oprleft:anynonarray oprname:|| oprnamespace:pg_catalog oprnegate:0 oprowner:POSTGRES oprrest:- oprresult:text oprright:text], map[descr:text search match oid:3762 oprcanhash:f oprcanmerge:f oprcode:ts_match_tt oprcom:0 oprjoin:matchingjoinsel oprkind:b oprleft:text oprname:@@ oprnamespace:pg_catalog oprnegate:0 oprowner:POSTGRES oprrest:matchingsel oprresult:bool oprright:text], map[descr:text search match oid:3763 oprcanhash:f oprcanmerge:f oprcode:ts_match_tq oprcom:0 oprjoin:matchingjoinsel oprkind:b oprleft:text oprname:@@ oprnamespace:pg_catalog oprnegate:0 oprowner:POSTGRES oprrest:matchingsel oprresult:bool oprright:tsquery], map[descr:get json object field oid:3962 oprcanhash:f oprcanmerge:f oprcode:json_object_field oprcom:0 oprjoin:- oprkind:b oprleft:json oprname:-> oprnamespace:pg_catalog oprnegate:0 oprowner:POSTGRES oprrest:- oprresult:json oprright:text], map[descr:get json object field as text oid:3963 oprcanhash:f oprcanmerge:f oprcode:json_object_field_text oprcom:0 oprjoin:- oprkind:b oprleft:json oprname:->> oprnamespace:pg_catalog oprnegate:0 oprowner:POSTGRES oprrest:- oprresult:text oprright:text], map[descr:get jsonb object field oid:3211 oprcanhash:f oprcanmerge:f oprcode:jsonb_object_field oprcom:0 oprjoin:- oprkind:b oprleft:jsonb oprname:-> oprnamespace:pg_catalog oprnegate:0 oprowner:POSTGRES oprrest:- oprresult:jsonb oprright:text], map[descr:get jsonb object field as text oid:3477 oprcanhash:f oprcanmerge:f oprcode:jsonb_object_field_text oprcom:0 oprjoin:- oprkind:b oprleft:jsonb oprname:->> oprnamespace:pg_catalog oprnegate:0 oprowner:POSTGRES oprrest:- oprresult:text oprright:text], map[descr:key exists oid:3247 oprcanhash:f oprcanmerge:f oprcode:jsonb_exists oprcom:0 oprjoin:matchingjoinsel oprkind:b oprleft:jsonb oprname:? oprnamespace:pg_catalog oprnegate:0 oprowner:POSTGRES oprrest:matchingsel oprresult:bool oprright:text], map[descr:delete object field oid:3285 oprcanhash:f oprcanmerge:f oprcode:jsonb_delete(jsonb,text) oprcom:0 oprjoin:- oprkind:b oprleft:jsonb oprname:- oprnamespace:pg_catalog oprnegate:0 oprowner:POSTGRES oprrest:- oprresult:jsonb oprright:text]

来源引用

完整定义与证据 JSON

定义来源

center · PostgreSQL 18 · 555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f

正文语言: en · 555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f