From: digoal@126.com
To: pgsql-bugs@postgresql.org
Subject: BUG #14590: something wrong when create extension in schema pg_catalog
Date: Wed, 15 Mar 2017 12:13:40 +0000
Message-ID: <20170315121340.1424.60144@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
The following bug has been logged on the website:
Bug reference: 14590
Logged by: Zhou Digoal
Email address: digoal@126.com
PostgreSQL version: 9.6.2
Operating system: CentOS 6.x x64
Description:
```
cd $PGHOME/share/extension
cp btree_gist--1.2.sql btree_gist--9.9.9.sql
vi btree_gist--9.9.9.sql
-- add this
create type new_type as (
id int,
c1 int
);
```
test
```
postgres=# create extension btree_gist with schema pg_catalog;
CREATE EXTENSION
postgres=# drop extension btree_gist ;
DROP EXTENSION
postgres=# \set VERBOSITY verbose
postgres=# create extension btree_gist with schema pg_catalog version
'9.9.9';
ERROR: 42501: permission denied to create "pg_catalog.new_type"
DETAIL: System catalog modifications are currently disallowed.
LOCATION: heap_create, heap.c:280
```
but why can do this?
```
postgres=# create extension btree_gist version '9.9.9';;
CREATE EXTENSION
postgres=# alter extension btree_gist set schema pg_catalog;
ALTER EXTENSION
```
and why can do this?
```
vi $PGDATA/postgresql.conf
allow_system_table_mods=on
pg_ctl restart -m fast
postgres=# create extension btree_gist with schema pg_catalog version
'9.9.9';
CREATE EXTENSION
```
table, composite type, seq ... in extension sql, so cann't create in
pg_catalog?
it's a bug?
best regards
digoal
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: digoal@126.com
Subject: Re: BUG #14590: something wrong when create extension in schema pg_catalog
In-Reply-To: <20170315121340.1424.60144@wrigleys.postgresql.org>
References: <20170315121340.1424.60144@wrigleys.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox