<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<STYLE type=text/css> <!--@import url(D:\Program Files\Netease\网易闪电邮\\data\scrollbar.css); --></STYLE>
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<STYLE>BLOCKQUOTE{margin-Top: 0px; margin-Bottom: 0px; margin-Left: 2em};                                                                         OL, UL{margin-Top: 0px; margin-Bottom: 0px};                                                                         p{margin-Top:0em; margin-Bottom:0px; padding:0px;};                                                                         body{FONT-SIZE:12pt; FONT-FAMILY:宋体,serif;};                                                                         </STYLE>
<META name=GENERATOR content="MSHTML 8.00.7600.16853"><BASE
target=_blank></HEAD>
<BODY
style="LINE-HEIGHT: 1.3; BORDER-RIGHT-WIDTH: 0px; MARGIN: 12px; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px"
marginheight="0" marginwidth="0"><STATIONERY>
<DIV>
<DIV><FONT size=3>
<H3 id=comment:description>Description:</H3>
<P>CREATE TABLE will create implicit sequence "vertices_tmp_id_seq" for serial
column "vertices_tmp.id" CONTEXT: SQL statement "CREATE TABLE vertices_tmp (id
serial)" PL/pgSQL function "<SPAN class=searchword0>assign_vertex_id</SPAN>"
line 21 at EXECUTE statement <SPAN class=searchword1>ERROR</SPAN>: relation
"baharestan.roads" does not exist CONTEXT: SQL statement "SELECT count(*) as
countids FROM "baharestan.roads"" PL/pgSQL function "assign_vertex_id" line 28
at FOR over EXECUTE statement </P>
<P> </P>
<P>sorry for my poor english:</P>
<P> </P>
<P>I read plpgsql program of assign_vertex_id in
pgAdminIII and find a bug,there are three lines like followed:</P>
<P><STRONG><FONT size=2>...</FONT></STRONG></P>
<P><STRONG><FONT size=2>FOR _r IN EXECUTE 'SELECT srid FROM geometry_columns
WHERE f_table_name='''|| quote_ident(geom_table)||''';' LOOP<BR> srid :=
_r.srid;<BR> END LOOP;</FONT></STRONG></P>
<P><STRONG><FONT size=2>...</FONT></STRONG></P></FONT></DIV>
<DIV><FONT size=3></FONT> </DIV>
<DIV>there is something wrong with "quote_ident(tablename)",this command will
add " around tablename, just like <STRONG><FONT
size=2>quote_ident(tablename) <=> "tablename"</FONT></STRONG></DIV>
<DIV>However, the above condition, program should modified to:</DIV>
<DIV>
<P><STRONG><FONT size=2>...</FONT></STRONG></P>
<P><STRONG><FONT size=2>FOR _r IN EXECUTE 'SELECT srid FROM geometry_columns
WHERE f_table_name='''|| geom_table||''';' LOOP<BR> srid :=
_r.srid;<BR> END LOOP;</FONT></STRONG></P>
<P><STRONG><FONT size=2>...</FONT></STRONG></P></DIV>
<DIV> </DIV>
<DIV><SPAN id=_FlashSignName>that's because there are ' around tablename,
there will be error with '"tablename"' instead of 'tablename'.</SPAN></DIV>
<DIV><SPAN></SPAN> </DIV>
<DIV><SPAN>ok! with above the little modification, there will be no
error with assign_vertex_id() :-)</SPAN></DIV>
<DIV><SPAN></SPAN> </DIV>
<DIV><SPAN>
<DIV><SPAN>YuLongzhen</SPAN></DIV></SPAN></DIV>
<DIV><SPAN>266061 Qingdao, China.</SPAN></DIV>
<DIV><SPAN><A
href="mailto:realylz@126.com">realylz@126.com</A> </SPAN></DIV>
<DIV><FONT size=2 face=Verdana><FONT color=#c0c0c0 size=2
face=Verdana><SPAN></SPAN></FONT> </DIV></FONT></DIV></STATIONERY></BODY></HTML>