Using pg_catalog to define things across schemas - Mailing list pgsql-general

From Andreas Kalsch
Subject Using pg_catalog to define things across schemas
Date
Msg-id 4ACE4BF3.3000901@gmx.de
Whole thread Raw
In response to Re: Renaming constraints  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
I am currently trying to solve the problem by using different schemas,
but then I have to consider all the GIS stuff. Putting the same things
in different schemas is no problem, but comparing the same type defined
in different schemas will lead to confusion, because Postgres treats
them as different types. So what about moving them to pg_catalog:


SET search_path TO pg_catalog;

CREATE LANGUAGE plpgsql;
CREATE LANGUAGE plpythonu;
\i /usr/share/postgresql-8.3-postgis/lwpostgis.sql
\i /usr/share/postgresql-8.3-postgis/spatial_ref_sys.sql

psql:/usr/share/postgresql-8.3-postgis/lwpostgis.sql:2222: ERROR:
permission denied to create "pg_catalog.geometry_dump"
DETAIL:  System catalog modifications are currently disallowed.
psql:/usr/share/postgresql-8.3-postgis/lwpostgis.sql:2228: ERROR:
current transaction is aborted, commands ignored until end of
transaction block
...


How can I enable system catalog modifications?

Thanks for your help, so far.

Andi


Tom Lane schrieb:
> Andreas Kalsch <andreaskalsch@gmx.de> writes:
>
>> But with this operation you will recreate the whole index. - I have
>> found out, that the name of the constraint's index is the same as the
>> constraint, so that I can simply rename the index.
>>
>
> You'd probably better rename the constraint too to avoid confusion.
> Failing anything else, there's always direct UPDATE of the pg_constraint
> catalog.
>
>             regards, tom lane
>
>
>


pgsql-general by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: interface for "non-SQL people"
Next
From: "Leonardo M." Ramé
Date:
Subject: Re: Query inside RTF