I don’t want to throw all my table definitions into the same public schema as the PostGIS definitions that get created with the standard PostGIS installation process (http://postgis.refractions.net/docs/ch02.html).
Does anyone have any suggestions for how to keep things organized into separate schemas when using PostGIS?
As I just answered on your related preceding question I recommend not to use the
publicschema for your objects at all. Reserve it for extensions like PostGis and use one or more separate schemas for your objects.The public schema is in no way different than any other schema in your database. PostgreSQL does not need it at all. It just happens to be the default schema where many extensions put their stuff. So put your stuff somewhere else and set the
search_pathwhere you need it.Then you can also create corresponding users with a matching preset
search_path. The basic setup could look something like this:You’ll also be interested in
DEFAULT PRIVILEGESfor users or schemas. More under this closely related question:Grant all on a specific schema in the db to a group role in PostgreSQL