1999-06-09
+
+
+ Terms
+
+
+
+ EXCLUSIVE
+
+ Exclusive lock that prevents other locks from being granted.
+
+
+
+
+
+
+
+ SHARE
+
+ Allows others to share lock. Prevents EXCLUSIVE locks.
+
+
+
+
+
+
+
+ ACCESS
+
+ Locks table schema.
+
+
+
+
+
+
+
+ ROW
+
+ Locks individual rows.
+
+
+
+
+
+
+
+ Notes
+
+ If EXCLUSIVE or SHARE are not speicified, EXCLUSIVE is assumed.
+ If ROW or ACCESS is not specified, the entire table is locked
+ for the duration of the transaction.
+
+
+
+
+
+
+
Inputs
This lock mode is acquired automatically over tables being queried.
-
Postgres releases automatically acquired
- ACCESS SHARE locks after the statement is done.
+ This lock is released automatically after the statement completes.
+ It does not remain for the duration of the transaction.
This is the least restrictive lock mode which conflicts only with
ACCESS EXCLUSIVE mode. It is intended to protect a table being
- queried from concurrent ALTER TABLE,
+ modified by concurrent ALTER TABLE,
DROP TABLE and VACUUM
- statements over the same table.
+ commands.
Automatically acquired by any SELECT FOR UPDATE statement.
+ While it is a SHARE lock, there is the intention to later upgrade
+ this to an EXCLUSIVE lock.
Automatically acquired by any UPDATE,
DELETE, INSERT statement.
-
+
Automatically acquired by any CREATE INDEX statement.
+ Share-locks entire table.
- Conflicts with ROW EXCLUSIVE, SHARE, SHARE ROW EXCLUSIVE,
- EXCLUSIVE and ACCESS EXCLUSIVE modes. This mode is more
- restrictive than SHARE mode because of only one transaction
- at time can hold this lock.
+ This is like an EXCLUSIVE lock, but allows SHARE ROW locks
+ by others.
+ Conflicts with ROW EXCLUSIVE, SHARE, SHARE ROW EXCLUSIVE,
+ EXCLUSIVE and ACCESS EXCLUSIVE modes.
Conflicts with ROW SHARE, ROW EXCLUSIVE, SHARE, SHARE ROW EXCLUSIVE,
EXCLUSIVE and ACCESS EXCLUSIVE modes. This mode is yet more
restrictive than that of SHARE ROW EXCLUSIVE; it blocks all concurrent
- SELECT FOR UPDATE queries.
+ SHARE ROW/SELECT FOR UPDATE queries.
- Automatically acquired by ALTER TABLE,
+ Automatically acquired by ALTER TABLE,
DROP TABLE, VACUUM statements.
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.102 2000/03/09 05:00:23 inoue Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.103 2000/03/23 21:38:58 momjian Exp $
*
*-------------------------------------------------------------------------
*/
mode_t oumask; /* Pre-existing umask value */
oumask = umask((mode_t) 022);
+
+ if (*filename != '/')
+ elog(ERROR, "Relative path not allowed for server side"
+ " COPY command.");
+
#ifndef __CYGWIN32__
fp = AllocateFile(filename, "w");
#else