mirror of
https://github.com/postgres/postgres.git
synced 2025-07-03 20:02:46 +03:00
Pre-beta mechanical code beautification.
Run pgindent, pgperltidy, and reformat-dat-files. This set of diffs is a bit larger than typical. We've updated to pg_bsd_indent 2.1.2, which properly indents variable declarations that have multi-line initialization expressions (the continuation lines are now indented one tab stop). We've also updated to perltidy version 20230309 and changed some of its settings, which reduces its desire to add whitespace to lines to make assignments etc. line up. Going forward, that should make for fewer random-seeming changes to existing code. Discussion: https://postgr.es/m/20230428092545.qfb3y5wcu4cm75ur@alvherre.pgsql
This commit is contained in:
@ -806,7 +806,7 @@ DefineRelation(CreateStmt *stmt, char relkind, Oid ownerId,
|
||||
AclResult aclresult;
|
||||
|
||||
aclresult = object_aclcheck(TableSpaceRelationId, tablespaceId, GetUserId(),
|
||||
ACL_CREATE);
|
||||
ACL_CREATE);
|
||||
if (aclresult != ACLCHECK_OK)
|
||||
aclcheck_error(aclresult, OBJECT_TABLESPACE,
|
||||
get_tablespace_name(tablespaceId));
|
||||
@ -1931,7 +1931,7 @@ ExecuteTruncateGuts(List *explicit_rels,
|
||||
resultRelInfo = resultRelInfos;
|
||||
foreach(cell, rels)
|
||||
{
|
||||
UserContext ucxt;
|
||||
UserContext ucxt;
|
||||
|
||||
if (run_as_table_owner)
|
||||
SwitchToUntrustedUser(resultRelInfo->ri_RelationDesc->rd_rel->relowner,
|
||||
@ -2143,7 +2143,7 @@ ExecuteTruncateGuts(List *explicit_rels,
|
||||
resultRelInfo = resultRelInfos;
|
||||
foreach(cell, rels)
|
||||
{
|
||||
UserContext ucxt;
|
||||
UserContext ucxt;
|
||||
|
||||
if (run_as_table_owner)
|
||||
SwitchToUntrustedUser(resultRelInfo->ri_RelationDesc->rd_rel->relowner,
|
||||
@ -2635,7 +2635,7 @@ MergeAttributes(List *schema, List *supers, char relpersistence,
|
||||
if (CompressionMethodIsValid(attribute->attcompression))
|
||||
{
|
||||
const char *compression =
|
||||
GetCompressionMethodName(attribute->attcompression);
|
||||
GetCompressionMethodName(attribute->attcompression);
|
||||
|
||||
if (def->compression == NULL)
|
||||
def->compression = pstrdup(compression);
|
||||
@ -13947,7 +13947,7 @@ ATExecChangeOwner(Oid relationOid, Oid newOwnerId, bool recursing, LOCKMODE lock
|
||||
|
||||
/* New owner must have CREATE privilege on namespace */
|
||||
aclresult = object_aclcheck(NamespaceRelationId, namespaceOid, newOwnerId,
|
||||
ACL_CREATE);
|
||||
ACL_CREATE);
|
||||
if (aclresult != ACLCHECK_OK)
|
||||
aclcheck_error(aclresult, OBJECT_SCHEMA,
|
||||
get_namespace_name(namespaceOid));
|
||||
@ -14377,7 +14377,7 @@ ATExecSetRelOptions(Relation rel, List *defList, AlterTableType operation,
|
||||
if (check_option)
|
||||
{
|
||||
const char *view_updatable_error =
|
||||
view_query_is_auto_updatable(view_query, true);
|
||||
view_query_is_auto_updatable(view_query, true);
|
||||
|
||||
if (view_updatable_error)
|
||||
ereport(ERROR,
|
||||
@ -14656,7 +14656,7 @@ AlterTableMoveAll(AlterTableMoveAllStmt *stmt)
|
||||
AclResult aclresult;
|
||||
|
||||
aclresult = object_aclcheck(TableSpaceRelationId, new_tablespaceoid, GetUserId(),
|
||||
ACL_CREATE);
|
||||
ACL_CREATE);
|
||||
if (aclresult != ACLCHECK_OK)
|
||||
aclcheck_error(aclresult, OBJECT_TABLESPACE,
|
||||
get_tablespace_name(new_tablespaceoid));
|
||||
@ -17134,7 +17134,7 @@ RangeVarCallbackForAlterRelation(const RangeVar *rv, Oid relid, Oid oldrelid,
|
||||
if (IsA(stmt, RenameStmt))
|
||||
{
|
||||
aclresult = object_aclcheck(NamespaceRelationId, classform->relnamespace,
|
||||
GetUserId(), ACL_CREATE);
|
||||
GetUserId(), ACL_CREATE);
|
||||
if (aclresult != ACLCHECK_OK)
|
||||
aclcheck_error(aclresult, OBJECT_SCHEMA,
|
||||
get_namespace_name(classform->relnamespace));
|
||||
|
Reference in New Issue
Block a user