PostgreSQL: SELECT all fields, filter some

Posted by Adam Matan on Stack Overflow See other posts from Stack Overflow or by Adam Matan
Published on 2010-06-07T08:08:25Z Indexed on 2010/06/07 8:12 UTC
Read the original article Hit count: 336

Hi,

In one of our databases, there is a table with dozens of columns, one of which is a geometry column.

I want to SELECT rows from the table, with the geometry transformed to another SRID. I want to use something like:

`SELECT *`

in order to avoid:

SELECT col_a, col_b, col_c, col_d, col_e, col_f, 
       col_g, col_h, transform(the_geom, NEW_SRID), ..., col_z

Any ideas?

Adam

© Stack Overflow or respective owner

Related posts about sql

Related posts about postgresql