<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<STYLE>.hmmessage P {
        PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px
}
BODY.hmmessage {
        FONT-SIZE: 10pt; FONT-FAMILY: Verdana
}
</STYLE>

<META content="MSHTML 6.00.6001.18294" name=GENERATOR></HEAD>
<BODY class=hmmessage>
<DIV dir=ltr align=left><SPAN class=324280715-05092009><FONT face=Arial 
color=#0000ff>I would guess you can use a combination of ST_MakeLine and 
ST_MakePolygon (you can also use ST_BuildArea instead of 
ST_MakePolygon)</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=324280715-05092009><FONT face=Arial 
color=#0000ff></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=324280715-05092009><FONT face=Arial 
color=#0000ff><A 
href="http://postgis.refractions.net/documentation/manual-svn/ST_MakeLine.html">http://postgis.refractions.net/documentation/manual-svn/ST_MakeLine.html</A></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=324280715-05092009><FONT face=Arial 
color=#0000ff></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=324280715-05092009><FONT face=Arial 
color=#0000ff></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=324280715-05092009><FONT face=Arial 
color=#0000ff><A 
href="http://postgis.refractions.net/documentation/manual-svn/ST_MakePolygon.html">http://postgis.refractions.net/documentation/manual-svn/ST_MakePolygon.html</A></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=324280715-05092009><FONT face=Arial 
color=#0000ff></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=324280715-05092009><FONT face=Arial 
color=#0000ff><A 
href="http://postgis.refractions.net/documentation/manual-svn/ST_BuildArea.html">http://postgis.refractions.net/documentation/manual-svn/ST_BuildArea.html</A></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=324280715-05092009><FONT face=Arial 
color=#0000ff></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=324280715-05092009><FONT face=Arial 
color=#0000ff>Leo</FONT></SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma><B>From:</B> postgis-users-bounces@postgis.refractions.net 
[mailto:postgis-users-bounces@postgis.refractions.net] <B>On Behalf Of </B>eehab 
hamzeh<BR><B>Sent:</B> Saturday, September 05, 2009 1:07 AM<BR><B>To:</B> 
postgis-users@postgis.refractions.net<BR><B>Subject:</B> [postgis-users] Create 
polygon from points in several rows<BR></FONT><BR></DIV>
<DIV></DIV>Hello, <BR> <BR>Can any body give me a hint how to insert a 
polygon. The polygon vertix are stored in another table, each point in seperate 
row.<BR> <BR>Kind regards<BR> <BR><BR>
<HR>
With Windows Live, you can organize, edit, and <A 
href="http://www.microsoft.com/middleeast/windows/windowslive/products/photo-gallery-edit.aspx" 
target=_new>share your photos.</A> </BODY></HTML>