Using pg_catalog to define things across schemas

Поиск
Список
Период
Сортировка
От Andreas Kalsch
Тема Using pg_catalog to define things across schemas
Дата
Msg-id 4ACE4BF3.3000901@gmx.de
обсуждение исходный текст
Ответ на Re: Renaming constraints  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Merlin Moncure
Дата:
Сообщение: Re: interface for "non-SQL people"
Следующее
От: "Leonardo M." Ramé
Дата:
Сообщение: Re: Query inside RTF