1 /*-------------------------------------------------------------------------
4 * functions for working with object addresses
6 * Portions Copyright (c) 1996-2011, PostgreSQL Global Development Group
7 * Portions Copyright (c) 1994, Regents of the University of California
9 * src/include/catalog/objectaddress.h
11 *-------------------------------------------------------------------------
13 #ifndef OBJECTADDRESS_H
14 #define OBJECTADDRESS_H
16 #include "nodes/parsenodes.h"
17 #include "storage/lock.h"
18 #include "utils/rel.h"
21 * An ObjectAddress represents a database object of any type.
23 typedef struct ObjectAddress
25 Oid classId; /* Class Id from pg_class */
26 Oid objectId; /* OID of the object */
27 int32 objectSubId; /* Subitem within object (eg column), or 0 */
30 extern ObjectAddress get_object_address(ObjectType objtype, List *objname,
31 List *objargs, Relation *relp,
32 LOCKMODE lockmode, bool missing_ok);
34 extern void check_object_ownership(Oid roleid,
35 ObjectType objtype, ObjectAddress address,
36 List *objname, List *objargs, Relation relation);
38 #endif /* PARSE_OBJECT_H */