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
61737a7b
Commit
61737a7b
authored
Jan 26, 2001
by
Peter Eisentraut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add some links from data type chapter to section on literal constants.
parent
6434ce65
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
26 deletions
+45
-26
doc/src/sgml/datatype.sgml
doc/src/sgml/datatype.sgml
+43
-24
doc/src/sgml/syntax.sgml
doc/src/sgml/syntax.sgml
+2
-2
No files found.
doc/src/sgml/datatype.sgml
View file @
61737a7b
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.4
7 2001/01/13 18:34:51
petere Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.4
8 2001/01/26 22:04:22
petere Exp $
-->
<chapter id="datatype">
...
...
@@ -335,8 +335,11 @@ $Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.47 2001/01/13 18:34:51 pe
</para>
<para>
The numeric types have a full set of corresponding arithmetic operators and
functions. Refer to <xref linkend="functions"> for more information.
The syntax of constants for the numeric types is described in
<xref linkend="sql-syntax-constants">. The numeric types have a
full set of corresponding arithmetic operators and
functions. Refer to <xref linkend="functions"> for more
information.
</para>
<para>
...
...
@@ -362,7 +365,7 @@ CREATE TABLE <replaceable class="parameter">tablename</replaceable> (<replaceabl
<programlisting>
CREATE SEQUENCE <replaceable class="parameter">tablename</replaceable>_<replaceable class="parameter">colname</replaceable>_seq;
CREATE TABLE <replaceable class="parameter">tablename</replaceable>
(<replaceable class="parameter">colname</replaceable>
INT4
DEFAULT nextval('<replaceable class="parameter">tablename</replaceable>_<replaceable class="parameter">colname</replaceable>_seq');
(<replaceable class="parameter">colname</replaceable>
integer
DEFAULT nextval('<replaceable class="parameter">tablename</replaceable>_<replaceable class="parameter">colname</replaceable>_seq');
CREATE UNIQUE INDEX <replaceable class="parameter">tablename</replaceable>_<replaceable class="parameter">colname</replaceable>_key on <replaceable class="parameter">tablename</replaceable> (<replaceable class="parameter">colname</replaceable>);
</programlisting>
...
...
@@ -394,20 +397,29 @@ CREATE TABLE <replaceable class="parameter">tablename</replaceable> (<replaceabl
<title>Monetary Type</title>
<note>
<title>
Obsolete Type
</title>
<title>
Deprecated
</title>
<para>
The <type>money</type> is now deprecated. Use <type>numeric</type>
or <type>decimal</type> instead. The money type may become a
locale-aware layer over the numeric type in a future release.
The <type>money</type> is now deprecated. Use
<type>numeric</type> or <type>decimal</type> instead, in
combination with the <function>to_char</function> function. The
money type may become a locale-aware layer over the
<type>numeric</type> type in a future release.
</para>
</note>
<para>
The <type>money</type> type supports US-style currency with
fixed decimal point representation.
If <productname>Postgres</productname> is compiled with USE_LOCALE
then the money type should use the monetary conventions defined for
<citetitle>locale(7)</citetitle>.
The <type>money</type> type stores U.S.-style currency with fixed
decimal point representation. If
<productname>Postgres</productname> is compiled with locale
support then the <type>money</type> type uses locale-specific
output formatting.
</para>
<para>
Input is accepted in a variety of formats, including integer and
floating point literals, as well as <quote>typical</quote>
currency formatting, such as <literal>'$1,000.00'</literal>.
Output is in the latter form.
</para>
<para>
...
...
@@ -434,14 +446,9 @@ CREATE TABLE <replaceable class="parameter">tablename</replaceable> (<replaceabl
</tgroup>
</table>
</para>
<para>
<type>numeric</type>
will replace the money type, and should be preferred.
</para>
</sect1>
<sect1 id="datatype-character">
<title>Character Types</title>
...
...
@@ -455,6 +462,12 @@ CREATE TABLE <replaceable class="parameter">tablename</replaceable> (<replaceabl
limit on the size of the field.
</para>
<para>
Refer to <xref linkend="sql-syntax-strings"> for information about
the syntax of string literals, and to <xref linkend="functions">
for information about available operators and functions.
</para>
<para>
<table tocentry="1">
<title><productname>Postgres</productname> Character Types</title>
...
...
@@ -661,8 +674,14 @@ CREATE TABLE <replaceable class="parameter">tablename</replaceable> (<replaceabl
</para>
<para>
Remember that any date or time input needs to be enclosed into single quotes,
like text strings.
Remember that any date or time input needs to be enclosed into
single quotes, like text strings. Refer to <xref
linkend="sql-syntax-constants-generic"> for more information.
SQL requires the following syntax
<synopsis>
<replaceable>type</replaceable> '<replaceable>value</replaceable>'
</synopsis>
but <productname>Postgres</productname> is more flexible.
</para>
<sect3>
...
...
@@ -1393,20 +1412,20 @@ January 8 04:05:06 1999 PST
<thead>
<row>
<entry>State</entry>
<entry>Output</entry>
<entry>Input</entry>
<entry>Output</entry>
</row>
</thead>
<tbody>
<row>
<entry>True</entry>
<entry>'t'</entry>
<entry>TRUE, 't', 'true', 'y', 'yes', '1'</entry>
<entry><literal>t</literal></entry>
</row>
<row>
<entry>False</entry>
<entry>'f'</entry>
<entry>FALSE, 'f', 'false', 'n', 'no', '0'</entry>
<entry><literal>f</literal></entry>
</row>
</tbody>
</tgroup>
...
...
doc/src/sgml/syntax.sgml
View file @
61737a7b
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/syntax.sgml,v 1.3
7 2001/01/22 23:34:33
petere Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/syntax.sgml,v 1.3
8 2001/01/26 22:04:22
petere Exp $
-->
<chapter id="sql-syntax">
...
...
@@ -304,7 +304,7 @@ REAL '1.23' -- string style
</para>
</sect3>
<sect3>
<sect3
id="sql-syntax-constants-generic"
>
<title>Constants of Other Types</title>
<para>
...
...
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