[GENERAL] Help with access check

2005-02-06 Thread Thomas Hallgren
Hi,
From code inside a C-function, given the AclId of a user and the Oid of 
a Schema, what's the most efficient way to find out if the user has been 
granted CREATE on the schema?

Thanks,
Thomas Hallgren
---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
 joining column's datatypes do not match


Re: [GENERAL] Help with access check

2005-02-06 Thread Alvaro Herrera
On Sun, Feb 06, 2005 at 03:28:31PM +0100, Thomas Hallgren wrote:

Hi,

 From code inside a C-function, given the AclId of a user and the Oid of 
 a Schema, what's the most efficient way to find out if the user has been 
 granted CREATE on the schema?

See src/backend/catalog/aclchk.c, function pg_namespace_aclcheck().

Why would you want to do that directly anyway?

-- 
Alvaro Herrera ([EMAIL PROTECTED])
La virtud es el justo medio entre dos defectos (Aristóteles)

---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]