[postgis-users] csv table to points and then create line based on same name

Puneet Kishor punk.kish at gmail.com
Sun Oct 2 12:14:31 PDT 2011


On Oct 2, 2011, at 2:01 PM, Gery . wrote:

> =====
> opdb=# insert into tmpline
> with t as (select * from tmp order by profile, id)
> select profile, st_makeline(geom)
> from t group by profile;
> INSERT 0 71
> opdb=#
> =====
> and why the "t" in the second line? could you explain me a bit the above code please?


look at [http://www.postgresql.org/docs/9.0/static/queries-with.html] which explains WITH very nicely.

(I had no idea about WITH until Nicolas showed it today)

--
Puneet Kishor


More information about the postgis-users mailing list