aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2010-07-24 12:17:35 +0000
committerPeter Eisentraut <peter_e@gmx.net>2010-07-24 12:17:35 +0000
commitcaf2d69ee0f80daab7168adff3a721fbf94f7ca7 (patch)
treee5004fce27dac3712f04fd2d35f5f8faab1322d0 /doc/src
parentf581215660c733f346e12a718e4596736b87ab69 (diff)
downloadpostgresql-caf2d69ee0f80daab7168adff3a721fbf94f7ca7.tar.gz
postgresql-caf2d69ee0f80daab7168adff3a721fbf94f7ca7.zip
Tidy up boolean data type page
by Thom Brown
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/datatype.sgml43
1 files changed, 30 insertions, 13 deletions
diff --git a/doc/src/sgml/datatype.sgml b/doc/src/sgml/datatype.sgml
index faf40befb1a..113ca97f9a0 100644
--- a/doc/src/sgml/datatype.sgml
+++ b/doc/src/sgml/datatype.sgml
@@ -1,4 +1,4 @@
-<!-- $PostgreSQL: pgsql/doc/src/sgml/datatype.sgml,v 1.251 2010/07/16 02:15:53 tgl Exp $ -->
+<!-- $PostgreSQL: pgsql/doc/src/sgml/datatype.sgml,v 1.252 2010/07/24 12:17:35 petere Exp $ -->
<chapter id="datatype">
<title>Data Types</title>
@@ -2759,13 +2759,34 @@ P <optional> <replaceable>years</>-<replaceable>months</>-<replaceable>days</> <
<para>
<productname>PostgreSQL</productname> provides the
- standard <acronym>SQL</acronym> type <type>boolean</type>.
- <type>boolean</type> can have one of only two states:
+ standard <acronym>SQL</acronym> type <type>boolean</type>;
+ see <xref linkend="datatype-boolean-table">.
+ The <type>boolean</type> type can have one of only two states:
<quote>true</quote> or <quote>false</quote>. A third state,
<quote>unknown</quote>, is represented by the
<acronym>SQL</acronym> null value.
</para>
+ <table id="datatype-boolean-table">
+ <title>Boolean Data Type</title>
+ <tgroup cols="3">
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Storage Size</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><type>boolean</type></entry>
+ <entry>1 byte</entry>
+ <entry>state of true of false</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
<para>
Valid literal values for the <quote>true</quote> state are:
<simplelist>
@@ -2794,6 +2815,12 @@ P <optional> <replaceable>years</>-<replaceable>months</>-<replaceable>days</> <
(<acronym>SQL</acronym>-compliant) usage.
</para>
+ <para>
+ <xref linkend="datatype-boolean-example"> shows that
+ <type>boolean</type> values are output using the letters
+ <literal>t</literal> and <literal>f</literal>.
+ </para>
+
<example id="datatype-boolean-example">
<title>Using the <type>boolean</type> type</title>
@@ -2813,16 +2840,6 @@ SELECT * FROM test1 WHERE a;
t | sic est
</programlisting>
</example>
-
- <para>
- <xref linkend="datatype-boolean-example"> shows that
- <type>boolean</type> values are output using the letters
- <literal>t</literal> and <literal>f</literal>.
- </para>
-
- <para>
- <type>boolean</type> uses 1 byte of storage.
- </para>
</sect1>
<sect1 id="datatype-enum">