* objectaddress.h
* functions for working with object addresses
*
- * Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1996-2011, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/catalog/objectaddress.h,v 1.1 2010/08/27 11:47:41 rhaas Exp $
+ * src/include/catalog/objectaddress.h
*
*-------------------------------------------------------------------------
*/
-#ifndef OBJECTADDRESS_H
+#ifndef OBJECTADDRESS_H
#define OBJECTADDRESS_H
#include "nodes/parsenodes.h"
#include "storage/lock.h"
-#include "utils/rel.h"
+#include "utils/relcache.h"
/*
* An ObjectAddress represents a database object of any type.
int32 objectSubId; /* Subitem within object (eg column), or 0 */
} ObjectAddress;
-ObjectAddress get_object_address(ObjectType objtype, List *objname,
- List *objargs, Relation *relp, LOCKMODE lockmode);
+extern ObjectAddress get_object_address(ObjectType objtype, List *objname,
+ List *objargs, Relation *relp,
+ LOCKMODE lockmode, bool missing_ok);
+
+extern void check_object_ownership(Oid roleid,
+ ObjectType objtype, ObjectAddress address,
+ List *objname, List *objargs, Relation relation);
#endif /* PARSE_OBJECT_H */