<div dir="ltr">Hi,<div><br></div><div>You could also cast the call to st_makeline into a specific geometry type, with some SRID (or 0 if data has no SRID) :</div><div><br></div><div>... <span style="font-family:arial,sans-serif;font-size:12.800000190734863px">ST_MakeLine(seeds.geom)::geometry(Linestring, <srid>)</span></div>

<div><span style="font-family:arial,sans-serif;font-size:12.800000190734863px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:12.800000190734863px">Nicolas</span></div><div><br></div><div><br></div>

</div><div class="gmail_extra"><br><br><div class="gmail_quote">On 7 May 2014 15:56, Stephen Woodbridge <span dir="ltr"><<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Linestrings are geometry objects. If you want your table to have tighter constraints on it create the table first and use addgeometrycolumn() to set the geometry type and constraints then use<br>


<br>
insert into "l_506" (oid, geom) from SELECT ...<br>
<br>
CREATE TABLE AS does not know what the query will return as far as geometry types so it make a general "geometry" column.<br>
<br>
-Steve<div><div class="h5"><br>
<br>
On 5/7/2014 9:38 AM, Pier Lorenzo Marasco wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
Hi all,<br>
<br>
I'm trying to make something very easy but I've a problem with results.<br>
I've two tables and I need to make lines from the joins of these two.<br>
I've try with this :<br>
<br>
CREATE TABLE "l_506" AS<br>
SELECT elements.oid, ST_MakeLine(seeds.geom) AS geom<br>
FROM elements<br>
    JOIN seeds ON (elements.oid=seeds.oid)<br>
WHERE elements.code='0506'<br>
GROUP BY elements.oid;<br>
<br>
All the elements in seeds are linestring but what I achieve is a<br>
geometry table. Ok.. I should alter the column type and everything goes<br>
as I aspect but I would like to understand where I'm getting wrong.<br>
<br>
L.<br>
<br>
--<br>
Pier Lorenzo Marasco<br>
<br>
<br>
<br></div></div>
______________________________<u></u>_________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-<u></u>bin/mailman/listinfo/postgis-<u></u>users</a><br>
<br>
</blockquote>
<br>
______________________________<u></u>_________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-<u></u>bin/mailman/listinfo/postgis-<u></u>users</a><br>
</blockquote></div><br></div>