Re: Using calculated columns as arguments in same SELECT

From: Michael Burke <michael(at)engtech(dot)ca>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Using calculated columns as arguments in same SELECT
Date: 2006-02-16 15:42:05
Message-ID: 200602161142.05657.michael@engtech.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On February 16, 2006 11:07 am, Michael Burke wrote:
> Hello,
>
> I am looking to simplify this query (uses PostGIS, but I have encountered
> this scenario with other chains of functions):
>
-- snip --

Immediately after sending this one, I realized I could do it with a
sub-select:

gtest=# SELECT X(SubSel.transformed_geom), Y(SubSel.transformed_geom) FROM (
SELECT SetSRID(
Transform(
GeomFromText(
'POINT(142512 1020225)', 26910
), 4326
),
-1) AS transformed_geom) SubSel;

This works fine.
Mike.

--
Michael Burke
Engineering Technologies Canada Ltd.
michael(at)engtech(dot)ca 1 (902) 628-1705

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Mark Fenbers 2006-02-16 17:47:55 Re: group by complications
Previous Message Michael Burke 2006-02-16 15:07:50 Using calculated columns as arguments in same SELECT