1
- <!-- $PostgreSQL: pgsql/doc/src/sgml/datatype.sgml,v 1.250 2010/07/03 04:03:06 tgl Exp $ -->
1
+ <!-- $PostgreSQL: pgsql/doc/src/sgml/datatype.sgml,v 1.250.2.1 2010/07/24 12:17:34 petere Exp $ -->
2
2
3
3
<chapter id="datatype">
4
4
<title>Data Types</title>
@@ -2751,13 +2751,34 @@ P <optional> <replaceable>years</>-<replaceable>months</>-<replaceable>days</> <
2751
2751
2752
2752
<para>
2753
2753
<productname>PostgreSQL</productname> provides the
2754
- standard <acronym>SQL</acronym> type <type>boolean</type>.
2755
- <type>boolean</type> can have one of only two states:
2754
+ standard <acronym>SQL</acronym> type <type>boolean</type>;
2755
+ see <xref linkend="datatype-boolean-table">.
2756
+ The <type>boolean</type> type can have one of only two states:
2756
2757
<quote>true</quote> or <quote>false</quote>. A third state,
2757
2758
<quote>unknown</quote>, is represented by the
2758
2759
<acronym>SQL</acronym> null value.
2759
2760
</para>
2760
2761
2762
+ <table id="datatype-boolean-table">
2763
+ <title>Boolean Data Type</title>
2764
+ <tgroup cols="3">
2765
+ <thead>
2766
+ <row>
2767
+ <entry>Name</entry>
2768
+ <entry>Storage Size</entry>
2769
+ <entry>Description</entry>
2770
+ </row>
2771
+ </thead>
2772
+ <tbody>
2773
+ <row>
2774
+ <entry><type>boolean</type></entry>
2775
+ <entry>1 byte</entry>
2776
+ <entry>state of true of false</entry>
2777
+ </row>
2778
+ </tbody>
2779
+ </tgroup>
2780
+ </table>
2781
+
2761
2782
<para>
2762
2783
Valid literal values for the <quote>true</quote> state are:
2763
2784
<simplelist>
@@ -2786,6 +2807,12 @@ P <optional> <replaceable>years</>-<replaceable>months</>-<replaceable>days</> <
2786
2807
(<acronym>SQL</acronym>-compliant) usage.
2787
2808
</para>
2788
2809
2810
+ <para>
2811
+ <xref linkend="datatype-boolean-example"> shows that
2812
+ <type>boolean</type> values are output using the letters
2813
+ <literal>t</literal> and <literal>f</literal>.
2814
+ </para>
2815
+
2789
2816
<example id="datatype-boolean-example">
2790
2817
<title>Using the <type>boolean</type> type</title>
2791
2818
@@ -2805,16 +2832,6 @@ SELECT * FROM test1 WHERE a;
2805
2832
t | sic est
2806
2833
</programlisting>
2807
2834
</example>
2808
-
2809
- <para>
2810
- <xref linkend="datatype-boolean-example"> shows that
2811
- <type>boolean</type> values are output using the letters
2812
- <literal>t</literal> and <literal>f</literal>.
2813
- </para>
2814
-
2815
- <para>
2816
- <type>boolean</type> uses 1 byte of storage.
2817
- </para>
2818
2835
</sect1>
2819
2836
2820
2837
<sect1 id="datatype-enum">
0 commit comments