<div><br><div>
<div><font size="3">
<h3 id="comment:description"><font size="2">Description:</font></h3>
<p><font size="2">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 
</font></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> </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>I'think there maybe someother similar error because of the 
quote_ident. I'm thankful for your hardship!</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></div><br><br><span title="neteasefooter"><span id="netease_mail_footer"></span></span>