Re: How does "createlang" interact with different schemas? - Mailing list pgsql-novice

From Sean Davis
Subject Re: How does "createlang" interact with different schemas?
Date
Msg-id 264855a00901050547i7a01d5c3o22ffaa3fb338a80c@mail.gmail.com
Whole thread Raw
In response to How does "createlang" interact with different schemas?  ("P Kapat" <kap4lin@gmail.com>)
List pgsql-novice


On Wed, Dec 31, 2008 at 3:14 PM, P Kapat <kap4lin@gmail.com> wrote:
Hi,

I am not sure if I should be mailing this to postgis list or this one,
but I'll shoot here first:

Setup: Postgres 8.11 on RedHat EL 5 + postgis 1.3.2

I do the following to add the postgis functionality to a database:

createlang plpgsql dbname
psql -d dbname -f /usr/share/pgsql/contrib/lwpostgis.sql
psql -d dbname -f /usr/share/pgsql/contrib/spatial_ref_sys.sql

This adds a bunch of functions and 2 tables to the public schema of
dbname. Later I add a schema to this dbname database. Will all these
postgis functions be available to the new schema? What about the 2
tables (geometry_columns and spatial_ref_sys)? How do these interact -
are they schema specific or accessible across different schemas in the
same database?

There is no such concept as "accessing from another schema".  You grant users access to whatever in the database you like using "grant" constructs.  If your search_path does not include the schema that holds the function, table, etc., then you may have to adopt the "schema.table" notation.  See the documentation for information about "GRANT" and schemas.
 

Now I'll have to admit that I do not know how postgres is setup
structurally, that is to say, what are schema, tablespace, catalogs,
domains, procedures,..... and hence the question to this list.

I have a bigger issue currently, but that will be in another mail.

--
Regards
PK
--------------------------------------
http://counter.li.org  #402424

--
Sent via pgsql-novice mailing list (pgsql-novice@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-novice

pgsql-novice by date:

Previous
From: David Gardner
Date:
Subject: Re: Optimization support
Next
From: "Oliveiros Cristina"
Date:
Subject: db encoding