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
CREATE TABLE people (
...,
height_cm numeric,
- height_in numeric GENERATED ALWAYS AS (height_cm * 2.54) STORED
+ height_in numeric GENERATED ALWAYS AS (height_cm / 2.54) STORED
);
The keyword STORED must be specified to choose the