PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "access/table.h"
#include "access/xact.h"
#include "catalog/namespace.h"
#include "catalog/pg_inherits.h"
#include "commands/lockcmds.h"
#include "miscadmin.h"
#include "nodes/nodeFuncs.h"
#include "rewrite/rewriteHandler.h"
#include "storage/lmgr.h"
#include "utils/acl.h"
#include "utils/lsyscache.h"
#include "utils/syscache.h"
Go to the source code of this file.
Data Structures | |
struct | LockViewRecurse_context |
Functions | |
static void | LockTableRecurse (Oid reloid, LOCKMODE lockmode, bool nowait) |
static AclResult | LockTableAclCheck (Oid reloid, LOCKMODE lockmode, Oid userid) |
static void | RangeVarCallbackForLockTable (const RangeVar *rv, Oid relid, Oid oldrelid, void *arg) |
static void | LockViewRecurse (Oid reloid, LOCKMODE lockmode, bool nowait, List *ancestor_views) |
void | LockTableCommand (LockStmt *lockstmt) |
static bool | LockViewRecurse_walker (Node *node, LockViewRecurse_context *context) |
Definition at line 280 of file lockcmds.c.
References AccessShareLock, ACL_DELETE, ACL_INSERT, ACL_MAINTAIN, ACL_SELECT, ACL_TRUNCATE, ACL_UPDATE, aclmask(), pg_class_aclcheck(), and RowExclusiveLock.
Referenced by LockViewRecurse_walker(), and RangeVarCallbackForLockTable().
void LockTableCommand | ( | LockStmt * | lockstmt | ) |
Definition at line 41 of file lockcmds.c.
References get_rel_relkind(), RangeVar::inh, lfirst, LockTableRecurse(), LockViewRecurse(), LockStmt::mode, NIL, LockStmt::nowait, RangeVarCallbackForLockTable(), RangeVarGetRelidExtended(), LockStmt::relations, and RVR_NOWAIT.
Referenced by standard_ProcessUtility().
Definition at line 117 of file lockcmds.c.
References ConditionalLockRelationOid(), ereport, errcode(), errmsg(), ERROR, find_all_inheritors(), get_rel_name(), lfirst_oid, LockRelationOid(), NoLock, ObjectIdGetDatum(), relname, SearchSysCacheExists1, and UnlockRelationOid().
Referenced by LockTableCommand(), and LockViewRecurse_walker().
|
static |
Definition at line 245 of file lockcmds.c.
References context, get_view_query(), GetUserId(), lappend_oid(), list_delete_last(), LockViewRecurse_walker(), NoLock, RelationData::rd_rel, RelationHasSecurityInvoker, table_close(), and table_open().
Referenced by LockTableCommand(), and LockViewRecurse_walker().
|
static |
Definition at line 177 of file lockcmds.c.
References aclcheck_error(), ACLCHECK_OK, ConditionalLockRelationOid(), context, ereport, errcode(), errmsg(), ERROR, expression_tree_walker, get_rel_name(), get_relkind_objtype(), RangeTblEntry::inh, IsA, lfirst, list_member_oid(), LockRelationOid(), LockTableAclCheck(), LockTableRecurse(), LockViewRecurse(), QTW_IGNORE_JOINALIASES, query_tree_walker, RangeTblEntry::relid, relname, and Query::rtable.
Referenced by LockViewRecurse().
|
static |
Definition at line 71 of file lockcmds.c.
References aclcheck_error(), ACLCHECK_OK, arg, ereport, errcode(), errdetail_relkind_not_supported(), errmsg(), ERROR, get_rel_persistence(), get_rel_relkind(), get_relkind_objtype(), GetUserId(), LockTableAclCheck(), MyXactFlags, OidIsValid, RangeVar::relname, and XACT_FLAGS_ACCESSEDTEMPNAMESPACE.
Referenced by LockTableCommand().