[postgis-devel] [PostGIS] #544: alias construct fails in SELECT
PostGIS
trac at osgeo.org
Thu Jun 17 04:58:15 PDT 2010
#544: alias construct fails in SELECT
------------------------+---------------------------------------------------
Reporter: darkblueb | Owner: pramsey
Type: defect | Status: closed
Priority: medium | Milestone: PostGIS 1.5.2
Component: postgis | Version: 1.5.X
Resolution: invalid | Keywords:
------------------------+---------------------------------------------------
Changes (by mcayland):
* status: new => closed
* resolution: => invalid
Comment:
This suggests to me that "area" is already defined somewhere else in theq
query - perhaps it is already a column within your constrained_sum2 or
ct_sac_0 tables?
I know that per the SQL spec, you are not allowed to reference an existing
column alias within a select, e.g.
SELECT st_area(col) AS foo, foo / 10 AS bar
is illegal. You need to repeat it again, e.g.
SELECT st_area(col) AS foo, st_area(col) / 10 AS bar
HTH,
Mark.
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/544#comment:1>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-devel
mailing list