Re: sepgsql contrib module - Mailing list pgsql-hackers
From | KaiGai Kohei |
---|---|
Subject | Re: sepgsql contrib module |
Date | |
Msg-id | 4D391382.3010105@ak.jp.nec.com Whole thread Raw |
In response to | Re: sepgsql contrib module (Robert Haas <robertmhaas@gmail.com>) |
Responses |
Re: sepgsql contrib module
Re: sepgsql contrib module Re: sepgsql contrib module |
List | pgsql-hackers |
The attached patch is a revised version. Changeset from the previous revision: - It fixed up a typo in catalog. The "process:{transition}" is correct permission name. - Add checks to avoid inlining function without db_procedure:{execute} permission. Sorry, process:{transition} shall be checked in other place. - sepgsql_utility_command() was added as a guest of ProcessUtility_hook, to control LOAD command, right now. - Documentation was revised. Mostly, description about permission checks. - Some mixture of tabs/spaces were fixed. - Source code comments were revised getting more friendly to pgindent, as follows: +/* + * sepgsql_mode + * + * SEPGSQL_MODE_DISABLED: Disabled on runtime + * SEPGSQL_MODE_DEFAULT: Same as system settings + * SEPGSQL_MODE_PERMISSIVE: Always permissive mode + * SEPGSQL_MODE_INTERNAL: Same as permissive, except for no audit logs + */ I also tried to run pgindent on the source files. Some of them were revised well according to the coding rule, but some of them were painful, like: { - "db_schema", SEPG_CLASS_DB_SCHEMA, + "db_schema", SEPG_CLASS_DB_SCHEMA, { - { "create", SEPG_DB_SCHEMA__CREATE }, - { "drop", SEPG_DB_SCHEMA__DROP }, - { "getattr", SEPG_DB_SCHEMA__GETATTR }, - { "setattr", SEPG_DB_SCHEMA__SETATTR }, - { "relabelfrom", SEPG_DB_SCHEMA__RELABELFROM }, - { "relabelto", SEPG_DB_SCHEMA__RELABELTO }, - { "search", SEPG_DB_SCHEMA__SEARCH }, - { "add_name", SEPG_DB_SCHEMA__ADD_NAME }, - { "remove_name", SEPG_DB_SCHEMA__REMOVE_NAME }, - { NULL, 0UL }, - } + { + "create", SEPG_DB_SCHEMA__CREATE}, + { + "drop", SEPG_DB_SCHEMA__DROP}, + { + "getattr", SEPG_DB_SCHEMA__GETATTR}, + { + "setattr", SEPG_DB_SCHEMA__SETATTR}, + { + "relabelfrom", SEPG_DB_SCHEMA__RELABELFROM}, + { + "relabelto", SEPG_DB_SCHEMA__RELABELTO}, + { + "search", SEPG_DB_SCHEMA__SEARCH}, + { + "add_name", SEPG_DB_SCHEMA__ADD_NAME}, + { + "remove_name", SEPG_DB_SCHEMA__REMOVE_NAME}, + { + NULL, 0UL},} }, Do we have any workaround to avoid these indenting/formatting? Or, the reformatted code is better than before? Thanks, (2011/01/07 12:02), Robert Haas wrote: > 2011/1/6 KaiGai Kohei<kaigai@ak.jp.nec.com>: >> If we use result of the `pg_config --sharedir` here, how about this >> writing style? Or, do we have any other ideas? > > I'm not sure - I'll look at your next draft more closely. > >> The background of this wikipage is that I was persuading people >> this feature being worthful, so the contents tend to philosophical >> things rather than actual specifications. > > Yeah. > >> I also think wiki page allows us to brush up the documentation >> rather than exchanging patches effectively. I'll set up a wiki page >> that contains same contents with *.sgml file to revise documentation >> stuff to be included into the *.sgml file finally. How about this idea? > > Sounds good. > -- KaiGai Kohei <kaigai@ak.jp.nec.com>
Attachment
pgsql-hackers by date: