Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcaf2d69

Browse files
committed
Tidy up boolean data type page
by Thom Brown
1 parentf581215 commitcaf2d69

File tree

1 file changed

+30
-13
lines changed

1 file changed

+30
-13
lines changed

‎doc/src/sgml/datatype.sgml

Lines changed: 30 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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 $ -->
22

33
<chapter id="datatype">
44
<title>Data Types</title>
@@ -2759,13 +2759,34 @@ P <optional> <replaceable>years</>-<replaceable>months</>-<replaceable>days</> <
27592759

27602760
<para>
27612761
<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:
27642765
<quote>true</quote> or <quote>false</quote>. A third state,
27652766
<quote>unknown</quote>, is represented by the
27662767
<acronym>SQL</acronym> null value.
27672768
</para>
27682769

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+
27692790
<para>
27702791
Valid literal values for the <quote>true</quote> state are:
27712792
<simplelist>
@@ -2794,6 +2815,12 @@ P <optional> <replaceable>years</>-<replaceable>months</>-<replaceable>days</> <
27942815
(<acronym>SQL</acronym>-compliant) usage.
27952816
</para>
27962817

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+
27972824
<example id="datatype-boolean-example">
27982825
<title>Using the <type>boolean</type> type</title>
27992826

@@ -2813,16 +2840,6 @@ SELECT * FROM test1 WHERE a;
28132840
t | sic est
28142841
</programlisting>
28152842
</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>
28262843
</sect1>
28272844

28282845
<sect1 id="datatype-enum">

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp