summaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/acl.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>1998-08-19 02:04:17 +0000
committerBruce Momjian <bruce@momjian.us>1998-08-19 02:04:17 +0000
commit7971539020a344dce3a8b3b9b93ff4f10e2f823a (patch)
tree8dca0af0d3ac8d431bff8c0dec793fe9733a1ee9 /src/backend/utils/adt/acl.c
parent31de2c9461dff3284ad61084c73eba093fa3f68e (diff)
downloadpostgresql-7971539020a344dce3a8b3b9b93ff4f10e2f823a.tar.gz
heap_fetch requires buffer pointer, must be released; heap_getnext
no longer returns buffer pointer, can be gotten from scan; descriptor; bootstrap can create multi-key indexes; pg_procname index now is multi-key index; oidint2, oidint4, oidname are gone (must be removed from regression tests); use System Cache rather than sequential scan in many places; heap_modifytuple no longer takes buffer parameter; remove unused buffer parameter in a few other functions; oid8 is not index-able; remove some use of single-character variable names; cleanup Buffer variables usage and scan descriptor looping; cleaned up allocation and freeing of tuples; 18k lines of diff;
Diffstat (limited to 'src/backend/utils/adt/acl.c')
-rw-r--r--src/backend/utils/adt/acl.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/backend/utils/adt/acl.c b/src/backend/utils/adt/acl.c
index f212dfcdd7..aa0f101469 100644
--- a/src/backend/utils/adt/acl.c
+++ b/src/backend/utils/adt/acl.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/acl.c,v 1.28 1998/06/15 19:29:31 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/acl.c,v 1.29 1998/08/19 02:02:53 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -86,7 +86,7 @@ getid(char *s, char *n)
static char *
aclparse(char *s, AclItem *aip, unsigned *modechg)
{
- HeapTuple htp;
+ HeapTuple htup;
char name[NAMEDATALEN];
Assert(s && aip && modechg);
@@ -150,11 +150,12 @@ aclparse(char *s, AclItem *aip, unsigned *modechg)
switch (aip->ai_idtype)
{
case ACL_IDTYPE_UID:
- htp = SearchSysCacheTuple(USENAME, PointerGetDatum(name),
- 0, 0, 0);
- if (!HeapTupleIsValid(htp))
+ htup = SearchSysCacheTuple(USENAME,
+ PointerGetDatum(name),
+ 0, 0, 0);
+ if (!HeapTupleIsValid(htup))
elog(ERROR, "aclparse: non-existent user \"%s\"", name);
- aip->ai_id = ((Form_pg_shadow) GETSTRUCT(htp))->usesysid;
+ aip->ai_id = ((Form_pg_shadow) GETSTRUCT(htup))->usesysid;
break;
case ACL_IDTYPE_GID:
aip->ai_id = get_grosysid(name);
@@ -241,7 +242,7 @@ aclitemout(AclItem *aip)
{
char *p;
char *out;
- HeapTuple htp;
+ HeapTuple htup;
unsigned i;
static AclItem default_aclitem = {ACL_ID_WORLD,
ACL_IDTYPE_WORLD,
@@ -260,9 +261,10 @@ aclitemout(AclItem *aip)
switch (aip->ai_idtype)
{
case ACL_IDTYPE_UID:
- htp = SearchSysCacheTuple(USESYSID, ObjectIdGetDatum(aip->ai_id),
- 0, 0, 0);
- if (!HeapTupleIsValid(htp))
+ htup = SearchSysCacheTuple(USESYSID,
+ ObjectIdGetDatum(aip->ai_id),
+ 0, 0, 0);
+ if (!HeapTupleIsValid(htup))
{
char *tmp = int2out(aip->ai_id);
@@ -283,7 +285,7 @@ aclitemout(AclItem *aip)
}
else
strncat(p, (char *) &((Form_pg_shadow)
- GETSTRUCT(htp))->usename,
+ GETSTRUCT(htup))->usename,
sizeof(NameData));
break;
case ACL_IDTYPE_GID: