Re: Show type in psql SELECT

From: Mike Toews <mwtoews(at)gmail(dot)com>
To: Craig Ringer <craig(at)2ndquadrant(dot)com>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Show type in psql SELECT
Date: 2013-02-25 00:54:33
Message-ID: CAM2FmMowmELKBBEmiFfP0ax9-8zRPF-Be2mV_htRUw7RUM7o0w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 25 February 2013 12:48, Craig Ringer <craig(at)2ndquadrant(dot)com> 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Hale Boyes 2013-02-25 01:00:11 Re: [DOCS] Contrib module "xml2" status
Previous Message Greg Stark 2013-02-25 00:38:36 Re: Show type in psql SELECT