pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Tidy up boolean data type page
2+ messages / 2 participants
[nested] [flat]

* Tidy up boolean data type page
@ 2010-07-22 22:02  Thom Brown <thombrown@gmail.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Thom Brown @ 2010-07-22 22:02 UTC (permalink / raw)
  To: pgsql-docs

Hi all,

I wanted to clean up the boolean data type documentation page a bit,
so thought the following was needed:

 - use a data type table like most of the other main data types so
it's more uniform (the the size of a boolean is only mentioned at the
very end and looks a bit odd, so removed that too)
 - move the reference to the usage example to before the example
 - minor text change in the first sentence so that it doesn't look
like it reads "boolean.boolean"

I've attached a patch with these changes, although feel free to list
the many reasons why this is a bad idea. ;)

Thanks

Thom

Attachments:

docs-boolean-type-tidy-up.patch (text/x-patch, 2.1K) download diff --git a/doc/src/sgml/datatype.sgml b/doc/src/sgml/datatype.sgml index cfe577d..2c3a0d6 100644 --- a/doc/src/sgml/datatype.sgml +++ b/doc/src/sgml/datatype.sgml @@ -2760,12 +2760,32 @@ 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: + 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 +2814,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 +2839,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">
^ permalink raw reply [nested|flat] 2+ messages in thread

* Re: Tidy up boolean data type page
@ 2010-07-24 12:18  Peter Eisentraut <peter_e@gmx.net>
  parent: Thom Brown <thombrown@gmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Peter Eisentraut @ 2010-07-24 12:18 UTC (permalink / raw)
  To: Thom Brown <thombrown@gmail.com>; +Cc: pgsql-docs

On tor, 2010-07-22 at 23:02 +0100, Thom Brown wrote:
> Hi all,
> 
> I wanted to clean up the boolean data type documentation page a bit,
> so thought the following was needed:
> 
>  - use a data type table like most of the other main data types so
> it's more uniform (the the size of a boolean is only mentioned at the
> very end and looks a bit odd, so removed that too)
>  - move the reference to the usage example to before the example
>  - minor text change in the first sentence so that it doesn't look
> like it reads "boolean.boolean"
> 
> I've attached a patch with these changes, although feel free to list
> the many reasons why this is a bad idea. ;)

Looks good to me.  Committed to 9.0 and 9.1.




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2010-07-24 12:18 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2010-07-22 22:02 Tidy up boolean data type page Thom Brown <thombrown@gmail.com>
2010-07-24 12:18 ` Peter Eisentraut <peter_e@gmx.net>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox