Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3436c5e

Browse files
committed
Remove ACLDEBUG #define and associated code.
In the footsteps ofaaf069a, remove ACLDEBUG, which was the onlyother remaining undocumented symbol in pg_config_manual.h. The factthat nobody had bothered to document it in seventeen years is a goodclue to its usefulness. In practice, none of the tracing logic itenabled would be of any value without additional effort.Discussion:https://postgr.es/m/6631.1587565046@sss.pgh.pa.us
1 parentee88ef5 commit3436c5e

File tree

3 files changed

+0
-46
lines changed

3 files changed

+0
-46
lines changed

‎src/backend/catalog/aclchk.c

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -141,24 +141,6 @@ static void recordExtensionInitPrivWorker(Oid objoid, Oid classoid, int objsubid
141141
Acl*new_acl);
142142

143143

144-
#ifdefACLDEBUG
145-
staticvoid
146-
dumpacl(Acl*acl)
147-
{
148-
inti;
149-
AclItem*aip;
150-
151-
elog(DEBUG2,"acl size = %d, # acls = %d",
152-
ACL_SIZE(acl),ACL_NUM(acl));
153-
aip=ACL_DAT(acl);
154-
for (i=0;i<ACL_NUM(acl);++i)
155-
elog(DEBUG2,"acl[%d]: %s",i,
156-
DatumGetCString(DirectFunctionCall1(aclitemout,
157-
PointerGetDatum(aip+i))));
158-
}
159-
#endif/* ACLDEBUG */
160-
161-
162144
/*
163145
* If is_grant is true, adds the given privileges for the list of
164146
* grantees to the existing old_acl. If is_grant is false, the
@@ -178,9 +160,6 @@ merge_acl_with_grant(Acl *old_acl, bool is_grant,
178160

179161
modechg=is_grant ?ACL_MODECHG_ADD :ACL_MODECHG_DEL;
180162

181-
#ifdefACLDEBUG
182-
dumpacl(old_acl);
183-
#endif
184163
new_acl=old_acl;
185164

186165
foreach(j,grantees)
@@ -219,10 +198,6 @@ merge_acl_with_grant(Acl *old_acl, bool is_grant,
219198
/* avoid memory leak when there are many grantees */
220199
pfree(new_acl);
221200
new_acl=newer_acl;
222-
223-
#ifdefACLDEBUG
224-
dumpacl(new_acl);
225-
#endif
226201
}
227202

228203
returnnew_acl;
@@ -3861,21 +3836,13 @@ pg_class_aclmask(Oid table_oid, Oid roleid,
38613836
IsSystemClass(table_oid,classForm)&&
38623837
classForm->relkind!=RELKIND_VIEW&&
38633838
!superuser_arg(roleid))
3864-
{
3865-
#ifdefACLDEBUG
3866-
elog(DEBUG2,"permission denied for system catalog update");
3867-
#endif
38683839
mask &= ~(ACL_INSERT |ACL_UPDATE |ACL_DELETE |ACL_TRUNCATE |ACL_USAGE);
3869-
}
38703840

38713841
/*
38723842
* Otherwise, superusers bypass all permission-checking.
38733843
*/
38743844
if (superuser_arg(roleid))
38753845
{
3876-
#ifdefACLDEBUG
3877-
elog(DEBUG2,"OID %u is superuser, home free",roleid);
3878-
#endif
38793846
ReleaseSysCache(tuple);
38803847
returnmask;
38813848
}

‎src/backend/utils/adt/acl.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -246,9 +246,6 @@ aclparse(const char *s, AclItem *aip)
246246

247247
Assert(s&&aip);
248248

249-
#ifdefACLDEBUG
250-
elog(LOG,"aclparse: input = \"%s\"",s);
251-
#endif
252249
s=getid(s,name);
253250
if (*s!='=')
254251
{
@@ -358,11 +355,6 @@ aclparse(const char *s, AclItem *aip)
358355

359356
ACLITEM_SET_PRIVS_GOPTIONS(*aip,privs,goption);
360357

361-
#ifdefACLDEBUG
362-
elog(LOG,"aclparse: correctly read [%u %x %x]",
363-
aip->ai_grantee,privs,goption);
364-
#endif
365-
366358
returns;
367359
}
368360

‎src/include/pg_config_manual.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -348,8 +348,3 @@
348348
* Enable tracing of syncscan operations (see also the trace_syncscan GUC var).
349349
*/
350350
/* #define TRACE_SYNCSCAN */
351-
352-
/*
353-
* Other debug #defines (documentation, anyone?)
354-
*/
355-
/* #define ACLDEBUG */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp