<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">G'day all,<div><br></div><div>having just (I think) upgraded PostGIS from 1.3.6 to  1.4.0 (still in PostgreSQL 8.3.7) I moved on in the documentation to :</div><div><br></div><div><span class="Apple-style-span" style="font-family: 'Lucida Grande', Verdana, Geneva, Arial, Helvetica, sans-serif; color: rgb(46, 46, 46); font-size: 14px; "><p style="font-size: 10pt; ">spatial_ref_sys table is restore from the dump, to ensure your custom additions are kept, but the distributed one might contain modification so you should backup your entries, drop the table and source the new one. If you did make additions we assume you know how to backup them before upgrading the table. Replace of it with the new one is done like this:</p><pre class="programlisting" style="border-right-width: 0px; border-left-width: 0px; border-bottom-width: 2px; border-top-width: 2px; font-family: 'Courier New', Courier, Monaco, monospace; line-height: 16px; border-top-color: rgb(247, 147, 30); border-right-color: rgb(247, 147, 30); border-bottom-color: rgb(247, 147, 30); border-left-color: rgb(247, 147, 30); border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; font-size: 11px; margin-bottom: 10px; margin-top: 10px; overflow-x: auto; overflow-y: auto; padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px; background-image: initial; background-repeat: initial; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: rgb(248, 248, 249); -webkit-border-top-right-radius: 2px 2px; -webkit-border-top-left-radius: 2px 2px; -webkit-border-bottom-left-radius: 2px 2px; -webkit-border-bottom-right-radius: 2px 2px; background-position: initial initial; ">$ psql newdb
newdb=> drop spatial_ref_sys;
DROP
newdb=> \i spatial_ref_sys.sql</pre></span><div><br></div><div><br></div><div>but got the following message :</div><div><br></div><div><div>australia=# \i /usr/local/pgsql/share/contrib/spatial_ref_sys.sql</div><div>BEGIN</div><div>psql:/usr/local/pgsql/share/contrib/spatial_ref_sys.sql:5: ERROR:  relation "spatial_ref_sys" does not exist</div><div><br></div><div>Lines 1 to 5 of spatial_ref_sys.sql are :</div><div><br></div><div><div>BEGIN;</div><div>---</div><div>--- EPSG 3819 : HD1909</div><div>---</div><div>INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3819,'EPSG',3819,'GEOGCS["HD1909",DATUM["Hungarian_Datum_1909",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[595.48,121.69,515.35,4.115,-2.9383,0.853,-3.408],AUTHORITY["EPSG","1024"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","3819"]]','+proj=longlat +ellps=bessel +towgs84=595.48,121.69,515.35,4.115,-2.9383,0.853,-3.408 +no_defs ');</div><div><br></div><div>so there is no table definition in the spatial_ref_sys.sql file. </div><div><br></div><div>I would wonder if maybe truncate spatial_ref_sys; might be a better option...</div><div><br></div><div>In the meantime, does anyone have the table definition for spatial_ref_sys.sql...?</div><div><br></div><div>cheers</div><div><br></div><div>Ben</div><div><br></div><div><br></div></div></div><div><br></div><div>
<div><br class="Apple-interchange-newline">-- </div><div><br>Ben Madin<br>REMOTE INFORMATION<br><br>t : +61 8 9192 5455<br>f : +61 8 9192 5535<br>m : 0448 887 220<br>Broome   WA   6725<br><br><a href="mailto:ben@remoteinformation.com.au">ben@remoteinformation.com.au</a><br><br><br><br><span class="Apple-tab-span" style="white-space: pre; "> </span><span class="Apple-tab-span" style="white-space: pre; "> </span><span class="Apple-tab-span" style="white-space: pre; "> </span><span class="Apple-tab-span" style="white-space: pre; "> </span><span class="Apple-tab-span" style="white-space: pre; "> </span><span class="Apple-tab-span" style="white-space: pre; "> </span><span class="Apple-tab-span" style="white-space: pre; "> </span>Out here, it pays to know...<br><br></div>
</div>
<br></div></body></html>