mirror of
https://github.com/postgres/postgres.git
synced 2025-06-11 20:28:21 +03:00
pgindent run for release 9.3
This is the first run of the Perl-based pgindent script. Also update pgindent instructions.
This commit is contained in:
@ -98,7 +98,7 @@ sepgsql_object_access(ObjectAccessType access,
|
||||
case OAT_POST_CREATE:
|
||||
{
|
||||
ObjectAccessPostCreate *pc_arg = arg;
|
||||
bool is_internal;
|
||||
bool is_internal;
|
||||
|
||||
is_internal = pc_arg ? pc_arg->is_internal : false;
|
||||
|
||||
@ -107,7 +107,7 @@ sepgsql_object_access(ObjectAccessType access,
|
||||
case DatabaseRelationId:
|
||||
Assert(!is_internal);
|
||||
sepgsql_database_post_create(objectId,
|
||||
sepgsql_context_info.createdb_dtemplate);
|
||||
sepgsql_context_info.createdb_dtemplate);
|
||||
break;
|
||||
|
||||
case NamespaceRelationId:
|
||||
@ -190,8 +190,8 @@ sepgsql_object_access(ObjectAccessType access,
|
||||
|
||||
case OAT_POST_ALTER:
|
||||
{
|
||||
ObjectAccessPostAlter *pa_arg = arg;
|
||||
bool is_internal = pa_arg->is_internal;
|
||||
ObjectAccessPostAlter *pa_arg = arg;
|
||||
bool is_internal = pa_arg->is_internal;
|
||||
|
||||
switch (classId)
|
||||
{
|
||||
@ -207,21 +207,21 @@ sepgsql_object_access(ObjectAccessType access,
|
||||
|
||||
case RelationRelationId:
|
||||
if (subId == 0)
|
||||
{
|
||||
{
|
||||
/*
|
||||
* A case when we don't want to apply permission
|
||||
* check is that relation is internally altered
|
||||
* without user's intention. E.g, no need to
|
||||
* check on toast table/index to be renamed at
|
||||
* end of the table rewrites.
|
||||
* without user's intention. E.g, no need to check
|
||||
* on toast table/index to be renamed at end of
|
||||
* the table rewrites.
|
||||
*/
|
||||
if (is_internal)
|
||||
break;
|
||||
break;
|
||||
|
||||
sepgsql_relation_setattr(objectId);
|
||||
}
|
||||
else
|
||||
sepgsql_attribute_setattr(objectId, subId);
|
||||
}
|
||||
else
|
||||
sepgsql_attribute_setattr(objectId, subId);
|
||||
break;
|
||||
|
||||
case ProcedureRelationId:
|
||||
@ -238,11 +238,11 @@ sepgsql_object_access(ObjectAccessType access,
|
||||
|
||||
case OAT_NAMESPACE_SEARCH:
|
||||
{
|
||||
ObjectAccessNamespaceSearch *ns_arg = arg;
|
||||
ObjectAccessNamespaceSearch *ns_arg = arg;
|
||||
|
||||
/*
|
||||
* If stacked extension already decided not to allow users
|
||||
* to search this schema, we just stick with that decision.
|
||||
* If stacked extension already decided not to allow users to
|
||||
* search this schema, we just stick with that decision.
|
||||
*/
|
||||
if (!ns_arg->result)
|
||||
break;
|
||||
|
@ -351,9 +351,8 @@ sepgsql_fmgr_hook(FmgrHookEventType event,
|
||||
*
|
||||
* Also, db_procedure:entrypoint permission should be checked
|
||||
* whether this procedure can perform as an entrypoint of the
|
||||
* trusted procedure, or not.
|
||||
* Note that db_procedure:execute permission shall be checked
|
||||
* individually.
|
||||
* trusted procedure, or not. Note that db_procedure:execute
|
||||
* permission shall be checked individually.
|
||||
*/
|
||||
if (stack->new_label)
|
||||
{
|
||||
|
@ -236,16 +236,16 @@ sepgsql_proc_relabel(Oid functionId, const char *seclabel)
|
||||
void
|
||||
sepgsql_proc_setattr(Oid functionId)
|
||||
{
|
||||
Relation rel;
|
||||
ScanKeyData skey;
|
||||
SysScanDesc sscan;
|
||||
HeapTuple oldtup;
|
||||
HeapTuple newtup;
|
||||
Form_pg_proc oldform;
|
||||
Form_pg_proc newform;
|
||||
uint32 required;
|
||||
ObjectAddress object;
|
||||
char *audit_name;
|
||||
Relation rel;
|
||||
ScanKeyData skey;
|
||||
SysScanDesc sscan;
|
||||
HeapTuple oldtup;
|
||||
HeapTuple newtup;
|
||||
Form_pg_proc oldform;
|
||||
Form_pg_proc newform;
|
||||
uint32 required;
|
||||
ObjectAddress object;
|
||||
char *audit_name;
|
||||
|
||||
/*
|
||||
* Fetch newer catalog
|
||||
@ -297,7 +297,7 @@ sepgsql_proc_setattr(Oid functionId)
|
||||
|
||||
sepgsql_avc_check_perms(&object,
|
||||
SEPG_CLASS_DB_PROCEDURE,
|
||||
required,
|
||||
required,
|
||||
audit_name,
|
||||
true);
|
||||
/* cleanups */
|
||||
|
@ -31,7 +31,7 @@
|
||||
|
||||
#include "sepgsql.h"
|
||||
|
||||
static void sepgsql_index_modify(Oid indexOid);
|
||||
static void sepgsql_index_modify(Oid indexOid);
|
||||
|
||||
/*
|
||||
* sepgsql_attribute_post_create
|
||||
@ -571,13 +571,13 @@ sepgsql_relation_relabel(Oid relOid, const char *seclabel)
|
||||
void
|
||||
sepgsql_relation_setattr(Oid relOid)
|
||||
{
|
||||
Relation rel;
|
||||
ScanKeyData skey;
|
||||
SysScanDesc sscan;
|
||||
HeapTuple oldtup;
|
||||
HeapTuple newtup;
|
||||
Form_pg_class oldform;
|
||||
Form_pg_class newform;
|
||||
Relation rel;
|
||||
ScanKeyData skey;
|
||||
SysScanDesc sscan;
|
||||
HeapTuple oldtup;
|
||||
HeapTuple newtup;
|
||||
Form_pg_class oldform;
|
||||
Form_pg_class newform;
|
||||
ObjectAddress object;
|
||||
char *audit_name;
|
||||
uint16_t tclass;
|
||||
@ -680,8 +680,8 @@ sepgsql_relation_setattr_extra(Relation catalog,
|
||||
AttrNumber anum_relation_id,
|
||||
AttrNumber anum_extra_id)
|
||||
{
|
||||
ScanKeyData skey;
|
||||
SysScanDesc sscan;
|
||||
ScanKeyData skey;
|
||||
SysScanDesc sscan;
|
||||
HeapTuple tuple;
|
||||
Datum datum;
|
||||
bool isnull;
|
||||
@ -708,7 +708,7 @@ sepgsql_relation_setattr_extra(Relation catalog,
|
||||
|
||||
/*
|
||||
* sepgsql_index_modify
|
||||
* Handle index create, update, drop
|
||||
* Handle index create, update, drop
|
||||
*
|
||||
* Unlike other relation kinds, indexes do not have their own security labels,
|
||||
* so instead of doing checks directly, treat them as extra attributes of their
|
||||
|
@ -81,6 +81,7 @@ sepgsql_schema_post_create(Oid namespaceId)
|
||||
tcontext,
|
||||
SEPG_CLASS_DB_SCHEMA,
|
||||
nsp_name);
|
||||
|
||||
/*
|
||||
* check db_schema:{create}
|
||||
*/
|
||||
|
Reference in New Issue
Block a user