失效链接处理 |
最新PostgreSQL 13.2官方文档 PDF 下载
本站整理下载:
相关截图:
主要内容:
4.1.4. Special Characters
Some characters that are not alphanumeric have a special meaning that is different from being an
operator. Details on the usage can be found at the location where the respective syntax element
is described. This section only exists to advise the existence and summarize the purposes of these
characters.
• A dollar sign ($) followed by digits is used to represent a positional parameter in the body of
a function definition or a prepared statement. In other contexts the dollar sign can be part of an
identifier or a dollar-quoted string constant.
• Parentheses (()) have their usual meaning to group expressions and enforce precedence. In some
cases parentheses are required as part of the fixed syntax of a particular SQL command.
• Brackets ([]) are used to select the elements of an array. See Section 8.15 for more information
on arrays.
• Commas (,) are used in some syntactical constructs to separate the elements of a list.
• The semicolon (;) terminates an SQL command. It cannot appear anywhere within a command,
except within a string constant or quoted identifier.
• The colon (:) is used to select “slices” from arrays. (See Section 8.15.) In certain SQL dialects
(such as Embedded SQL), the colon is used to prefix variable names.
• The asterisk (*) is used in some contexts to denote all the fields of a table row or composite value.
It also has a special meaning when used as the argument of an aggregate function, namely that the
aggregate does not require any explicit parameter.
• The period (.) is used in numeric constants, and to separate schema, table, and column names.
4.1.5. Comments
A comment is a sequence of characters beginning with double dashes and extending to the end of
the line, e.g.:
-- This is a standard SQL comment
Alternatively, C-style block comments can be used:
/* multiline comment
* with nesting: /* nested block comment */
*/
where the comment begins with /* and extends to the matching occurrence of */. These block
comments nest, as specified in the SQL standard but unlike C, so that one can comment out larger
blocks of code that might contain existing block comments
|