[postgis-users] How to add spatial functions to a custom schema

Obe, Regina robe.dnd at cityofboston.gov
Mon Aug 11 05:16:23 PDT 2008


Gimbrogno,
Do the following before running the .sql files.

SET search_path = info;

Keep in mind that you should really only have those functions and table
loaded in one schema not all of them even if you have your tables in
different schemas.  The functions and tables should exist only once per
database.

You will also want to add the info schema to your database search path,
otherwise many things and software that works with PostGIS will not work
since they don't prefix the schema name.

So to do that you would do something like this

ALTER DATABASE your_database_name_here SET search_path="$user", public,
info;


Hope that helps,
Regina
 

-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of
gimbrogno
Sent: Monday, August 11, 2008 7:51 AM
To: postgis-users at postgis.refractions.net
Subject: RE: [postgis-users] How to add spatial functions to a custom
schema


Hi, thanks for your answer but it is not my problem...

I have to create spatial functions under a schema called 'info', and If
I
use psql -d myDb -f lwpostgis.sql, the spatial functions are created
under
the schema 'public'!

How Can I make spatial function under schema 'info' ?

Thanks a lot in advance...

Mark Lidstone wrote:
> 
> Hi Gimborgno,
> 
> I think all you need to do is add the schema name as the first
argument
> to the AddGeometryColumn procedure.  E.g. replace:
> 
> SELECT AddGeometryColumn('table', 'field', 4326, 'POINT', 2);
> 
> with:
> 
> SELECT AddGeometryColumn('new_schema', 'table', 'field', 4326,
'POINT',
> 2);
> 
> Thanks,
> 
> Mark Lidstone
> Tel: +44 (0)23 80232222; Fax: +44 (0)23 80232891
>  
> BMT Cordah Ltd 
> Grove House
> 7 Ocean Way
> Ocean Village
> Southampton
> SO14 3TJ
>  
> 
> -----Original Message-----
> From: postgis-users-bounces at postgis.refractions.net
> [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of
> gimbrogno
> Sent: 11 August 2008 12:34
> To: postgis-users at postgis.refractions.net
> Subject: [postgis-users] How to add spatial functions to a custom
schema
> 
> 
> Hi all,
> 
> I have a problem with spatial functions to a new custom schema.
> 
> I made a db, and following the PostGIS documentation I have created
the
> spatial extensions on it, but under the 'public' schema... How can I
> create the spatial extensions on a custom schema?
> 
> Thanks a lot in advance
> 
> PS: English is not my native language, so excuse me for errors...
> --
> View this message in context:
>
http://www.nabble.com/How-to-add-spatial-functions-to-a-custom-schema-tp
> 18923897p18923897.html
> Sent from the PostGIS - User mailing list archive at Nabble.com.
> 
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
> 
> 
> BMT Cordah Ltd.
> A member of the BMT group of companies
> Registered Office: Investment House, 6 Union Row, Aberdeen AB10 1DQ
> Registered in Scotland No. 163413
> http://www.bmtcordah.com/
> http://www.bmt.org/
> 
> The contents of this e-mail and any attachments are intended only for
the
> use of the e-mail addressee(s) shown. If you are not that person, or
one
> of those persons, you are not allowed to take any action based upon it
or
> to copy it, forward, distribute or disclose the contents of it and you
> should please delete it from your system. BMT Cordah Limited does not
> accept liability for any errors or omissions in the context of this
e-mail
> or its attachments, which arise as a result of Internet transmission,
nor
> accept liability for statements which are those of the author and not
> clearly made on behalf of BMT Cordah Limited.
> 
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
> 
> 

-- 
View this message in context:
http://www.nabble.com/How-to-add-spatial-functions-to-a-custom-schema-tp
18923897p18924157.html
Sent from the PostGIS - User mailing list archive at Nabble.com.

_______________________________________________
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