On 25 February 2013 12:48, Craig Ringer <[email protected]> wrote:
> However, the thing I want most couldn't be provided by this patch
> because it seems to be a deeper server limitation: the ability to get
> typmod data from calculation results like
>
> NUMERIC(8,3) '11.131' + NUMERIC(8,3) '12.123'
But is the derived typmod always available? For example, with PostGIS:
postgis=# SELECT g, ST_Centroid(g) INTO TEMP t
postgis-# FROM (SELECT 'POLYGON((0 0, 1 1, 0 1, 0 0))'::geometry(Polygon)
g) p;
SELECT 1
postgis=# \d t
Table "pg_temp_15.t"
Column | Type | Modifiers
-------------+-------------------+-----------
g | geometry(Polygon) |
st_centroid | geometry |
-Mike