Multiple Schemas with PostGIS

View: New views
5 Messages — Rating Filter:   Alert me  

Multiple Schemas with PostGIS

by Stefan Schwarzer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I would like to place my postgis libs into another schema; or  
eventually have two schemas with the postgis extension.

An older message ( http://postgis.refractions.net/pipermail/postgis- 
users/2006-January/010602.html ) indicates that it is not possible to  
have postgis in multiple schemas.

Is this still the status quo? Or has this changed and then how can I  
install postgis in another schema?

Thanks for any hints!
_______________________________________________
postgis-users mailing list
postgis-users@...
http://postgis.refractions.net/mailman/listinfo/postgis-users

Re: Multiple Schemas with PostGIS

by strk :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, Jan 15, 2007 at 02:18:12PM +0100, Stefan Schwarzer wrote:

> Hi,
>
> I would like to place my postgis libs into another schema; or  
> eventually have two schemas with the postgis extension.
>
> An older message ( http://postgis.refractions.net/pipermail/postgis- 
> users/2006-January/010602.html ) indicates that it is not possible to  
> have postgis in multiple schemas.
>
> Is this still the status quo? Or has this changed and then how can I  
> install postgis in another schema?

Nothing changed in this reguard. The hard part is PL/pgsql functions
in need to know where postgis is installed. Might be done at build
time, but then your enabler script will be bound to your specific
configuration. IIRC later pgsql version behave more nicely.

--strk;
_______________________________________________
postgis-users mailing list
postgis-users@...
http://postgis.refractions.net/mailman/listinfo/postgis-users

Re: Multiple Schemas with PostGIS

by Stephen Woodbridge :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

strk@... wrote:

> On Mon, Jan 15, 2007 at 02:18:12PM +0100, Stefan Schwarzer wrote:
>> Hi,
>>
>> I would like to place my postgis libs into another schema; or  
>> eventually have two schemas with the postgis extension.
>>
>> An older message ( http://postgis.refractions.net/pipermail/postgis- 
>> users/2006-January/010602.html ) indicates that it is not possible to  
>> have postgis in multiple schemas.
>>
>> Is this still the status quo? Or has this changed and then how can I  
>> install postgis in another schema?
>
> Nothing changed in this reguard. The hard part is PL/pgsql functions
> in need to know where postgis is installed. Might be done at build
> time, but then your enabler script will be bound to your specific
> configuration. IIRC later pgsql version behave more nicely.

We use it all the time installed a one schema and referenced in another
schema. We control this by setting up users and search_path.

-Steve
_______________________________________________
postgis-users mailing list
postgis-users@...
http://postgis.refractions.net/mailman/listinfo/postgis-users

Re: Multiple Schemas with PostGIS

by Stefan Schwarzer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

>>> Hi,
>>>
>>> I would like to place my postgis libs into another schema; or  
>>> eventually have two schemas with the postgis extension.
>>>
>>> An older message ( http://postgis.refractions.net/pipermail/ 
>>> postgis- users/2006-January/010602.html ) indicates that it is  
>>> not possible to  have postgis in multiple schemas.
>>>
>>> Is this still the status quo? Or has this changed and then how  
>>> can I  install postgis in another schema?
>> Nothing changed in this reguard. The hard part is PL/pgsql functions
>> in need to know where postgis is installed. Might be done at build
>> time, but then your enabler script will be bound to your specific
>> configuration. IIRC later pgsql version behave more nicely.
>
> We use it all the time installed a one schema and referenced in  
> another schema. We control this by setting up users and search_path.

Can you explain more exactly what that means? The reference, and what  
I am supposed to do? If I am not mistaken, the search_path can be  
specified in postgres.conf, no?

Stef

_______________________________________________
postgis-users mailing list
postgis-users@...
http://postgis.refractions.net/mailman/listinfo/postgis-users

Re: Multiple Schemas with PostGIS

by Stephen Woodbridge :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Stefan Schwarzer wrote:

>>>> Hi,
>>>>
>>>> I would like to place my postgis libs into another schema; or  
>>>> eventually have two schemas with the postgis extension.
>>>>
>>>> An older message ( http://postgis.refractions.net/pipermail/postgis- 
>>>> users/2006-January/010602.html ) indicates that it is not possible
>>>> to  have postgis in multiple schemas.
>>>>
>>>> Is this still the status quo? Or has this changed and then how can
>>>> I  install postgis in another schema?
>>> Nothing changed in this reguard. The hard part is PL/pgsql functions
>>> in need to know where postgis is installed. Might be done at build
>>> time, but then your enabler script will be bound to your specific
>>> configuration. IIRC later pgsql version behave more nicely.
>>
>> We use it all the time installed a one schema and referenced in
>> another schema. We control this by setting up users and search_path.
>
> Can you explain more exactly what that means? The reference, and what I
> am supposed to do? If I am not mistaken, the search_path can be
> specified in postgres.conf, no?

Something like this (assumes postgreSQL 8.0+):

1) create a database
2) create a schema say "postgis"
3) set search_path to "postgis", public;
4) run the scripts to install postgis will go into "postgis" schema
5) create a new schema say "project1"
6) set search_path to project1, postgis, public;
7) work with postgis in the "project1" schema

-Steve
_______________________________________________
postgis-users mailing list
postgis-users@...
http://postgis.refractions.net/mailman/listinfo/postgis-users