Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
175dbf74
Commit
175dbf74
authored
Mar 30, 2000
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make discussion of names clearer and more accurate.
parent
996bc535
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
7 deletions
+19
-7
doc/src/sgml/syntax.sgml
doc/src/sgml/syntax.sgml
+19
-7
No files found.
doc/src/sgml/syntax.sgml
View file @
175dbf74
...
...
@@ -340,17 +340,23 @@ A comment beginning with "/*" extends to the first occurrence of "*/".
<title>Names</title>
<para>
Names in SQL are sequences of less than NAMEDATALEN alphanumeric characters,
starting with an alphabetic character. By default, NAMEDATALEN is set
to 32 (but at the time the system is built, NAMEDATALEN can be changed
by changing the <literal>#define</literal> in
src/backend/include/postgres.h).
Underscore ("_") is considered an alphabetic character.
Names in SQL must begin with a letter
(<literal>a</literal>-<literal>z</literal>) or underscore
(<literal>_</literal>).
Subsequent characters in a name can be letters, digits
(<literal>0</literal>-<literal>9</literal>),
or underscores. The system uses no more than NAMEDATALEN-1 characters
of a name; longer names can be written in queries, but they will be
truncated.
By default, NAMEDATALEN is 32 so the maximum name length is 31 (but
at the time the system is built, NAMEDATALEN can be changed in
src/include/postgres_ext.h).
</para>
<para>
Names containing other characters may be formed by surrounding them
with double quotes. For example, table or column names may contain
with double quotes (<literal>"</literal>). For example, table or column
names may contain
otherwise disallowed characters such as spaces, ampersands, etc. if
quoted. Quoting a name also makes it case-sensitive,
whereas unquoted names are always folded to lower case. For example,
...
...
@@ -359,6 +365,12 @@ A comment beginning with "/*" extends to the first occurrence of "*/".
considered the same by <productname>Postgres</productname>, but
<literal>"Foo"</literal> is a different name.
</para>
<para>
Double quotes can also be used to protect a name that would otherwise
be taken to be an SQL keyword. For example, <literal>IN</literal>
is a keyword but <literal>"IN"</literal> is a name.
</para>
</sect1>
<sect1>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment