[postgis-users] schemas and postgis data

Robert Buckley robertdbuckley at yahoo.com
Thu Sep 22 03:17:40 PDT 2011


I have just read this explaining about how to structure data and functions within postgresql
http://blog.cleverelephant.ca/2010/09/postgis-back-up-restore.html


..."The "public" schema is where the PostGIS functions and system tables get installed, so if you dump that schema you get all those definitions in your dump. If those definitions are mixed in amongst your data, loading them into a fresh database gets tricky: are the paths to the libraries the same? are there function name clashes? (The utils/postgis_restore.pl script attempts manfully to strip out PostGIS components from a dump file to allow a clean restore, but it is hard to get 100% performance.)
If, on the other hand, all your data is neatly separated into its own schema, you can neatly backup just that schema and avoid having PostGIS system information mixed in with your data. That means you can easily restore your data into any version of PostGIS and PostgreSQL that you like. So upgrades are easy easy easy.
Remember: Store your data in a schema other than "public".
"


Basically Paul recommends saving geodata in a different schema to the postgis functions. 

My questions are...
1"if the data is located in a different schema which does not have the 800 odd postgis functions, are the functions still available to the data?"
2"are cross schema queries allowed?"
3 "does it also make sense to seperate non-spatial tables into their own schemas?"


thanks for any advice,

Rob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20110922/9432e25e/attachment.html>


More information about the postgis-users mailing list