1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-14 18:42:34 +03:00

Add NOWAIT option to LOCK command

This commit is contained in:
Tatsuo Ishii
2004-03-11 01:47:41 +00:00
parent 60a068b389
commit 0b86ade1c2
9 changed files with 56 additions and 15 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/commands/lockcmds.c,v 1.8 2003/11/29 19:51:47 pgsql Exp $
* $PostgreSQL: pgsql/src/backend/commands/lockcmds.c,v 1.9 2004/03/11 01:47:35 ishii Exp $
*
*-------------------------------------------------------------------------
*/
@ -59,7 +59,7 @@ LockTableCommand(LockStmt *lockstmt)
aclcheck_error(aclresult, ACL_KIND_CLASS,
get_rel_name(reloid));
rel = relation_open(reloid, lockstmt->mode);
rel = conditional_relation_open(reloid, lockstmt->mode, lockstmt->nowait);
/* Currently, we only allow plain tables to be locked */
if (rel->rd_rel->relkind != RELKIND_RELATION)