only one namespace allowed by a authid at pg_namespace table?

From: sunpeng <bluevaley(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: only one namespace allowed by a authid at pg_namespace table?
Date: 2010-04-28 16:43:28
Message-ID: g2o46cc57ac1004280943kd0cebfden4ffd16e7c18b307a@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

only one namespace allowed by a authid at pg_namespace table? for in the
function:
static void recomputeNamespacePath(void){
...
if (strcmp(curname, "$user") == 0)
{
/* $user --- substitute namespace matching user name, if any */
HeapTuple tuple;

tuple = SearchSysCache(AUTHOID,
ObjectIdGetDatum(roleid),
0, 0, 0);
if (HeapTupleIsValid(tuple))
{
char *rname;

rname = NameStr(((Form_pg_authid)
GETSTRUCT(tuple))->rolname);
namespaceId = GetSysCacheOid(NAMESPACENAME,
CStringGetDatum(rname),
0, 0, 0);
ReleaseSysCache(tuple);
if (OidIsValid(namespaceId) &&
!list_member_oid(oidlist, namespaceId) &&
pg_namespace_aclcheck(namespaceId, roleid,
ACL_USAGE) == ACLCHECK_OK)
oidlist = lappend_oid(oidlist, namespaceId);
}
}
}
...
}
I noticed with the revoke of function GetSysCacheOid(NAMESPACENAME,
CStringGetDatum(rname),0, 0, 0); only return one oid of namespace.

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2010-04-28 17:00:58 Re: Writing SRF
Previous Message Jorge Arevalo 2010-04-28 16:26:02 Writing SRF