From: Michael Burke <michael@engtech.ca>
To: pgsql-sql@postgresql.org
Subject: Re: Using calculated columns as arguments in same SELECT
Date: Thu, 16 Feb 2006 11:42:05 -0400
Message-ID: <200602161142.05657.michael@engtech.ca> (raw)
In-Reply-To: <200602161107.50608.michael@engtech.ca>
References: <200602161107.50608.michael@engtech.ca>
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@engtech.ca 1 (902) 628-1705
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: michael@engtech.ca
Subject: Re: Using calculated columns as arguments in same SELECT
In-Reply-To: <200602161142.05657.michael@engtech.ca>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox