![](https://img-blog.csdnimg.cn/20190416221748449.jpeg?x-oss-process=image/resize,m_fixed,h_224,w_224)
PostgreSQL 11.2用户手册学习
对于PostgreSQL官方文档《PostgreSQL 11.2 Documentation》的翻译、学习、实践。
丹心明月
路上,期待不一样的精彩。
展开
-
PostgreSQL usermanual翻译暂停20200420
因工作需要加快pg usermanual的阅读速度,故今日起暂停翻译,待阅读完成后有时间再继续进行翻译。感谢关注。原创 2020-04-20 15:17:50 · 235 阅读 · 0 评论 -
9.7.2. SIMILAR TO Regular Expressions
9.7.2. SIMILAR TO Regular Expressions9.7.2.SIMILAR TO正则表达式string SIMILAR TO pattern [ESCAPE escape-character]string NOT SIMILAR TO pattern [ESCAPE escape-character]The SIMILAR TO ope...翻译 2020-03-24 11:14:22 · 273 阅读 · 0 评论 -
9.7.1. LIKE
9.7.1. LIKE9.7.1. LIKEstring LIKE pattern [ESCAPE escape-character]string NOT LIKE pattern [ESCAPE escape-character]The LIKE expression returns true if the string matches the supplie...翻译 2020-03-24 10:45:29 · 255 阅读 · 0 评论 -
9.7. Pattern Matching
9.7. Pattern Matching9.7. 模式匹配There are three separate approaches to pattern matching provided by PostgreSQL: the traditional SQLLIKE operator, the more recent SIMILAR TO operator (added in SQL:1...翻译 2020-03-24 09:54:12 · 220 阅读 · 0 评论 -
9.6. Bit String Functions and Operators
9.6. Bit String Functions and Operators9.6.位串函数和操作符This section describes functions and operators for examining and manipulating bit strings, that isvalues of the typesbitandbit varying. Aside...翻译 2020-03-23 11:07:33 · 243 阅读 · 0 评论 -
9.5. Binary String Functions and Operators
9.5. Binary String Functions and Operators9.5.二进制字符串函数和运算符This section describes functions and operators for examining and manipulating values of type bytea.本节介绍了用于检查和操作bytea类型的值的函数和运算符。SQL...翻译 2020-03-19 16:47:55 · 200 阅读 · 0 评论 -
9.4.1. format
9.4.1.format9.4.1.formatThe functionformatproduces output formatted according to a format string, in a style similar tothe C functionsprintf.函数format产生的输出根据格式字符串格式化,格式类似于C函数sprintf。...翻译 2020-03-19 16:36:56 · 211 阅读 · 0 评论 -
9.4. String Functions and Operators
9.4. String Functions and Operators9.4.字符串函数和运算符This section describes functions and operators for examining and manipulating string values. Stringsin this context include values of the types cha...翻译 2020-03-19 15:30:33 · 213 阅读 · 0 评论 -
9.3. Mathematical Functions and Operators
9.3. Mathematical Functions and Operators9.3.数学函数和运算符Mathematical operators are provided for many PostgreSQL types. For types without standard mathematicalconventions (e.g., date/time types) we d...翻译 2020-03-19 10:41:11 · 276 阅读 · 0 评论 -
9.2. Comparison Functions and Operators
9.2. Comparison Functions and Operators9.2.比较函数和运算符The usual comparison operators are available, as shown in Table 9.1.常用的比较运算符可用,如表9.1所示。转存失败重新上传取消转存失败重新上传取消Note注The!=operator is c...翻译 2020-03-19 10:11:22 · 249 阅读 · 0 评论 -
9.1. Logical Operators
9.1. Logical Operators9.1.逻辑运算符The usual logical operators are available:常用的逻辑运算符均可用:ANDORNOTSQL uses a three-valued logic system with true, false, and null, which represents “...翻译 2020-03-19 09:12:58 · 344 阅读 · 0 评论 -
9. Functions and Operators
Chapter 9. Functions and Operators第九章.函数和操作符PostgreSQL provides a large number of functions and operators for the built-in data types. Users canalso define their own functions and operators, as d...翻译 2020-03-19 09:04:57 · 168 阅读 · 0 评论 -
8.21. Pseudo-Types
8.21. Pseudo-Types8.21.伪类型The PostgreSQL type system contains a number of special-purpose entries that are collectively calledpseudo-types. A pseudo-type cannot be used as a column data type, but...翻译 2020-03-18 16:15:49 · 690 阅读 · 0 评论 -
8.20. pg_lsn Type
8.20. pg_lsn Type8.20.pg_lsn类型The pg_lsn data type can be used to store LSN (Log Sequence Number) data which is a pointer toa location in the WAL. This type is a representation of XLogRecPtr and ...翻译 2020-03-18 15:57:39 · 220 阅读 · 0 评论 -
8.19. Object Identifier Types
8.19. Object Identifier Types8.19.对象标识类型Object identifiers (OIDs) are used internally by PostgreSQL as primary keys for various system tables.OIDs are not added to user-created tables, unlessWIT...翻译 2020-03-18 15:45:17 · 331 阅读 · 0 评论 -
8.18. Domain Types
8.18. Domain Types8.18.域类型A domain is a user-defined data type that is based on another underlying type. Optionally, it can haveconstraints that restrict its valid values to a subset of what the ...翻译 2020-03-18 14:59:10 · 408 阅读 · 0 评论 -
8.17.10. Constraints on Ranges
8.17.10. Constraints on Ranges8.17.10.范围上的约束While UNIQUE is a natural constraint for scalar values, it is usually unsuitable for range types. Instead,an exclusion constraint is often more appropri...翻译 2020-03-18 14:51:46 · 152 阅读 · 0 评论 -
8.17.9. Indexing
8.17.9. Indexing8.17.9.索引GiST and SP-GiST indexes can be created for table columns of range types. For instance, to createa GiST index:可在范围类型上创建GiST和SP-GIST类型的索引。例如,创建GiST索引:CREATE INDEX r...翻译 2020-03-18 11:36:17 · 232 阅读 · 0 评论 -
8.17.8. Defining New Range Types
8.17.8. Defining New Range Types8.17.8.定义范围类型Users can define their own range types. The most common reason to do this is to use ranges oversubtypes not provided among the built-in range types. F...翻译 2020-03-18 11:30:37 · 245 阅读 · 0 评论 -
8.17.7. Discrete Range Types
8.17.7. Discrete Range Types8.17.7. 离散范围类型A discrete range is one whose element type has a well-defined “step”, such as integer or date.In these types two elements can be said to be adjacent, when...翻译 2020-03-18 11:00:00 · 207 阅读 · 0 评论 -
8.17.6. Constructing Ranges
8.17.6. Constructing Ranges8.17.6.范围构造Each range type has a constructor function with the same name as the range type. Using the constructorfunction is frequently more convenient than writing a r...翻译 2020-03-18 10:19:45 · 243 阅读 · 0 评论 -
8.17.5. Range Input/Output
8.17.5. Range Input/Output8.17.5.范围输入/输出The input for a range value must follow one of the following patterns:范围值的输入必须符合以下几种方法:(lower-bound,upper-bound)(lower-bound,upper-bound][lower...翻译 2020-03-18 10:13:51 · 220 阅读 · 0 评论 -
8.17.4. Infinite (Unbounded) Ranges
8.17.4. Infinite (Unbounded) Ranges8.17.4. 无限(无界)范围The lower bound of a range can be omitted, meaning that all points less than the upper bound areincluded in the range. Likewise, if the upper bo...翻译 2020-03-18 09:43:08 · 301 阅读 · 0 评论 -
8.17.3. Inclusive and Exclusive Bounds
8.17.3. Inclusive and Exclusive Bounds8.17.3.开闭合区间Every non-empty range has two bounds, the lower bound and the upper bound. All points betweenthese values are included in the range. An inclusive...翻译 2020-03-18 09:25:50 · 377 阅读 · 0 评论 -
8.17.2. Examples
8.17.2. Examples8.17.2.示例CREATE TABLE reservation (room int, during tsrange);INSERT INTO reservation VALUES(1108, '[2010-01-01 14:30, 2010-01-01 15:30)');-- ContainmentSELECT int4range(...翻译 2020-03-18 09:20:18 · 136 阅读 · 0 评论 -
8.17.1. Built-in Range Types
8.17.1. Built-in Range Types8.17.1.内置范围类型PostgreSQL comes with the following built-in range types:PostgreSQL包含以下内置范围类型:• int4range — Range of integer• int8range — Range of bigint• numrange...翻译 2020-03-18 09:18:34 · 155 阅读 · 0 评论 -
8.17. Range Types
8.17. Range Types8.17.范围类型Range types are data types representing a range of values of some element type (called the range'ssubtype). For instance, ranges of timestamp might be used to represent ...翻译 2020-03-18 09:01:47 · 175 阅读 · 0 评论 -
8.16.6. Composite Type Input and Output Syntax
8.16.6. Composite Type Input and Output Syntax8.16.6.复合类型的输入及输出语法The external text representation of a composite value consists of items that are interpreted accordingto the I/O conversion rules ...翻译 2020-03-18 08:56:00 · 229 阅读 · 0 评论 -
8.16.5. Using Composite Types in Queries
8.16.5. Using Composite Types in Queries8.16.5.在查询中使用复合类型There are various special syntax rules and behaviors associated with composite types in queries. Theserules provide useful shortcuts, but ...翻译 2020-03-17 16:24:00 · 249 阅读 · 0 评论 -
8.16.4. Modifying Composite Types
8.16.4. Modifying Composite Types8.16.4.修改复合类型Here are some examples of the proper syntax for inserting and updating composite columns. First,inserting or updating a whole column:以下为插入和更新复合类型的示...翻译 2020-03-11 16:21:19 · 211 阅读 · 0 评论 -
8.16.3. Accessing Composite Types
8.16.3. Accessing Composite Types8.16.3.访问复合类型To access a field of a composite column, one writes a dot and the field name, much like selecting afield from a table name. In fact, it's so much lik...翻译 2020-03-11 09:54:28 · 148 阅读 · 0 评论 -
8.16.2. Constructing Composite Values
8.16.2. Constructing Composite Values8.16.2.构建复合值To write a composite value as a literal constant, enclose the field values within parentheses and separatethem by commas. You can put double quote...翻译 2020-03-10 22:24:39 · 142 阅读 · 0 评论 -
8.16.1. Declaration of Composite Types
8.16.1. Declaration of Composite Types8.16.1.声明复合类型Here are two simple examples of defining composite types:以下为两个定义复合类型的简单示例:CREATE TYPE complex AS (r double precision,i double precis...翻译 2020-03-10 22:07:52 · 200 阅读 · 0 评论 -
8.16. Composite Types
8.16. Composite Types8.16.复合类型composite type represents the structure of a row or record; it is essentially just a list of field namesand their data types. PostgreSQL allows composite types to be...翻译 2020-03-10 17:07:29 · 330 阅读 · 0 评论 -
8.15.6. Array Input and Output Syntax
8.15.6. Array Input and Output Syntax8.15.6.数组输入和输出语法The external text representation of an array value consists of items that are interpreted according tothe I/O conversion rules for the array's...翻译 2020-03-10 17:02:03 · 147 阅读 · 0 评论 -
8.15.5. Searching in Arrays
8.15.5. Searching in Arrays8.15.5.检索数组To search for a value in an array, each value must be checked. This can be done manually, if you knowthe size of the array. For example:要在数组中搜索值,必须检查每个值。 如...翻译 2020-03-10 15:39:10 · 159 阅读 · 0 评论 -
8.15.4. Modifying Arrays
8.15.4. Modifying Arrays8.15.4.修改数组An array value can be replaced completely:一个数组值也可以被完全替代:UPDATE sal_emp SET pay_by_quarter = '{25000,25000,27000,27000}'WHERE name = 'Carol';or ...翻译 2020-03-10 15:17:25 · 97 阅读 · 0 评论 -
8.15.3. Accessing Arrays
8.15.3. Accessing Arrays8.15.3.访问数组Now, we can run some queries on the table. First, we show how to access a single element of an array.This query retrieves the names of the employees whose pay ch...翻译 2020-03-10 13:58:36 · 139 阅读 · 0 评论 -
8.15.2. Array Value Input
8.15.2. Array Value Input8.15.2.数组值输入To write an array value as a literal constant, enclose the element values within curly braces and separatethem by commas. (If you know C, this is not unlike t...翻译 2020-03-10 10:43:59 · 163 阅读 · 0 评论 -
8.15.1. Declaration of Array Types
8.15.1. Declaration of Array Types8.15.1.声明数组类型To illustrate the use of array types, we create this table:我们创建下表,以展示数组类型的使用:CREATE TABLE sal_emp (name text,pay_by_quarter integer[],...翻译 2020-03-10 10:20:34 · 211 阅读 · 0 评论