]> granicus.if.org Git - postgresql/commitdiff
Doc: fix bogus example.
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 13 Jun 2019 03:05:40 +0000 (23:05 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 13 Jun 2019 03:05:40 +0000 (23:05 -0400)
This wasn't incorrect SQL, but it was doing cm-to-inch conversion
backward, so it might confuse readers.

Per bug #15849 from TAKATSUKA Haruka.

Discussion: https://postgr.es/m/15849-37ad0c561a836107@postgresql.org

doc/src/sgml/ddl.sgml

index b80040d0cc265799bf772ffda4b1a8a80bbd168f..ed2d9c60d50f62bf88c1ce7d8904361ee0bd42b6 100644 (file)
@@ -259,7 +259,7 @@ CREATE TABLE products (
 CREATE TABLE people (
     ...,
     height_cm numeric,
-    height_in numeric <emphasis>GENERATED ALWAYS AS (height_cm * 2.54) STORED</emphasis>
+    height_in numeric <emphasis>GENERATED ALWAYS AS (height_cm / 2.54) STORED</emphasis>
 );
 </programlisting>
    The keyword <literal>STORED</literal> must be specified to choose the