1
- <!-- $PostgreSQL: pgsql/doc/src/sgml/datatype.sgml,v 1.251 2010/07/16 02:15:53 tgl Exp $ -->
1
+ <!-- $PostgreSQL: pgsql/doc/src/sgml/datatype.sgml,v 1.252 2010/07/24 12:17:35 petere Exp $ -->
2
2
3
3
<chapter id="datatype">
4
4
<title>Data Types</title>
@@ -2759,13 +2759,34 @@ P <optional> <replaceable>years</>-<replaceable>months</>-<replaceable>days</> <
2759
2759
2760
2760
<para>
2761
2761
<productname>PostgreSQL</productname> provides the
2762
- standard <acronym>SQL</acronym> type <type>boolean</type>.
2763
- <type>boolean</type> can have one of only two states:
2762
+ standard <acronym>SQL</acronym> type <type>boolean</type>;
2763
+ see <xref linkend="datatype-boolean-table">.
2764
+ The <type>boolean</type> type can have one of only two states:
2764
2765
<quote>true</quote> or <quote>false</quote>. A third state,
2765
2766
<quote>unknown</quote>, is represented by the
2766
2767
<acronym>SQL</acronym> null value.
2767
2768
</para>
2768
2769
2770
+ <table id="datatype-boolean-table">
2771
+ <title>Boolean Data Type</title>
2772
+ <tgroup cols="3">
2773
+ <thead>
2774
+ <row>
2775
+ <entry>Name</entry>
2776
+ <entry>Storage Size</entry>
2777
+ <entry>Description</entry>
2778
+ </row>
2779
+ </thead>
2780
+ <tbody>
2781
+ <row>
2782
+ <entry><type>boolean</type></entry>
2783
+ <entry>1 byte</entry>
2784
+ <entry>state of true of false</entry>
2785
+ </row>
2786
+ </tbody>
2787
+ </tgroup>
2788
+ </table>
2789
+
2769
2790
<para>
2770
2791
Valid literal values for the <quote>true</quote> state are:
2771
2792
<simplelist>
@@ -2794,6 +2815,12 @@ P <optional> <replaceable>years</>-<replaceable>months</>-<replaceable>days</> <
2794
2815
(<acronym>SQL</acronym>-compliant) usage.
2795
2816
</para>
2796
2817
2818
+ <para>
2819
+ <xref linkend="datatype-boolean-example"> shows that
2820
+ <type>boolean</type> values are output using the letters
2821
+ <literal>t</literal> and <literal>f</literal>.
2822
+ </para>
2823
+
2797
2824
<example id="datatype-boolean-example">
2798
2825
<title>Using the <type>boolean</type> type</title>
2799
2826
@@ -2813,16 +2840,6 @@ SELECT * FROM test1 WHERE a;
2813
2840
t | sic est
2814
2841
</programlisting>
2815
2842
</example>
2816
-
2817
- <para>
2818
- <xref linkend="datatype-boolean-example"> shows that
2819
- <type>boolean</type> values are output using the letters
2820
- <literal>t</literal> and <literal>f</literal>.
2821
- </para>
2822
-
2823
- <para>
2824
- <type>boolean</type> uses 1 byte of storage.
2825
- </para>
2826
2843
</sect1>
2827
2844
2828
2845
<sect1 id="datatype-enum">
0 commit comments