[postgis-users] Do I need to copy postGIS objects to mynew schema?

Obe, Regina robe.dnd at cityofboston.gov
Wed Mar 26 05:28:24 PDT 2008


There is a fourth way.  You can set it just for that database as well
with

ALTER DATABASE somedb SET search_path to schema1, public; 

In fact a lot of settings you can do at the database level and in 8.3 I
think you can also do it for a specific function.

-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of
Kevin Neufeld
Sent: Wednesday, March 26, 2008 12:22 AM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] Do I need to copy postGIS objects to mynew
schema?

I think there three ways to change your search path.

-- Will temporarily set the search path for this connection only
SET search_path TO schema1, pubic;

-- Will set the search path for the specified user for all subsequent 
connection (not the current connection)
ALTER USER username SET search_path to schema1, public;

-- change the postgresql.conf file to set the search path for all users 
for all subsequent connections
search_path = '"$user", schema1, public'

Cheers,
Kevin

kreshna_iceheart at yahoo.com wrote:
> Thank you, Nicolas. When I make changes to the search path, it will 
> stay permanent, won't it?
>  
> Regards,
> -Kresh
>  
>
>
> */Nicolas Ribot <nicky666 at gmail.com>/* wrote:
>
>     > I'm planning to use database schemas to organize my spatial
>     tables. For
>     > example, all spatial tables of GIS objects belong to Bali island
>     is to be
>     > kept in a schema named "bali", etcetera.
>     >
>     > Problem is, when I created a new schema named bali, it did not
>     inherit all
>     > the postGIS objects of the public schema.
>     >
>     > As you can see on the attached screenshot (I'm using pgAdmin
>     III), the
>     > public schema contains all the Aggregates, Domains, Functions,
>     etcetera,
>     > which are all part of postGIS functionality. Examples are
>     geomunion function
>     > and earth domain, which exist in the public schema but do not
>     exist on bali
>     > schema.
>     >
>     > Can I use bali schema to store postGIS tables then? Or should I
>     copy all the
>     > postGIS Aggregates, Domains, Functions, etc, to the bali schema
>     in order to
>     > make it work? And if that's the case, anyone know the easiest
>     way to do so?
>     >
>
>     Postgis functions should stay in the public schema. No need to
>     copy them.
>
>     You will be able to use them on the bali.* tables by either fully
>     qualifying the tables' name in your queries or by adding your
newly
>     created schema to the search path (no need to qualify tables names
>     with the schema in this case)
>
>     Nicolas
>     _______________________________________________
>     postgis-users mailing list
>     postgis-users at postgis.refractions.net
>     http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
>
>
> __________________________________________________________________
> So be it. If saying "NO" means being alone, then to hell with love, 
> with women, with marriage, with God, religions, bars, nightclubs, 
> computer games, and all the shit life keeps pumping at me. I'll walk 
> alone, but with freedom and a healed pride.
>
>
------------------------------------------------------------------------
> Looking for last minute shopping deals? Find them fast with Yahoo! 
> Search. 
>
<http://us.rd.yahoo.com/evt=51734/*http://tools.search.yahoo.com/newsear
ch/category.php?category=shopping> 
>
>
------------------------------------------------------------------------
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>   
_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
-----------------------------------------
The substance of this message, including any attachments, may be
confidential, legally privileged and/or exempt from disclosure
pursuant to Massachusetts law. It is intended
solely for the addressee. If you received this in error, please
contact the sender and delete the material from any computer.




More information about the postgis-users mailing list