Re: Extension security improvement: Add support for extensions with an owned schema - Mailing list pgsql-hackers

From Artem Gavrilov
Subject Re: Extension security improvement: Add support for extensions with an owned schema
Date
Msg-id CAFPkQKzALOTTBrhj2qDHwVxZQyjF5Xg_P9M=Tn_Dcm3vr=xdTA@mail.gmail.com
Whole thread Raw
In response to Extension security improvement: Add support for extensions with an owned schema  (Jelte Fennema-Nio <me@jeltef.nl>)
List pgsql-hackers
Hello Jelte,

I reviewed your patch. Overall it looks good, I didn't find any problems with code. Documentation is in place and clear.

Initial Run
===========
The patch applies cleanly to HEAD (196063d6761). All tests successfully pass.

Comments
===========
1) I noticed that pg_dump changes weren't covered with tests.

2) I assume these error messages may be confusing, especially first one: 
-- Fails for an already existing schema to be provided
CREATE EXTENSION test_ext_owned_schema SCHEMA test_ext_owned_schema;
ERROR:  schema "test_ext_owned_schema" already exists
-- Fails because a different schema is set in control file
CREATE EXTENSION test_ext_owned_schema SCHEMA test_schema;
ERROR:  extension "test_ext_owned_schema" must be installed in schema "test_ext_owned_schema"

In both cases it's not clear that the extension requires schema ownership. Can hint messages be added there?

--

Artem Gavrilov

Senior Software Engineer, Percona

artem.gavrilov@percona.compercona.com

pgsql-hackers by date:

Previous
From: Jacob Champion
Date:
Subject: Re: Support getrandom() for pg_strong_random() source
Next
From: Álvaro Herrera
Date:
Subject: Re: trivial grammar refactor