Commit 4ea2b8f5 authored by Tom Lane's avatar Tom Lane

Pg_lo_open must OR together multiple modes, not AND them. Per report

from Andreas Kretzer.
parent d75ed09b
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/pgtclCmds.c,v 1.59 2001/11/05 17:46:37 momjian Exp $ * $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/pgtclCmds.c,v 1.60 2001/12/03 14:49:46 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -1109,11 +1109,11 @@ Pg_lo_open(ClientData cData, Tcl_Interp *interp, int argc, char *argv[]) ...@@ -1109,11 +1109,11 @@ Pg_lo_open(ClientData cData, Tcl_Interp *interp, int argc, char *argv[])
break; break;
case 'r': case 'r':
case 'R': case 'R':
mode = mode & INV_READ; mode |= INV_READ;
break; break;
case 'w': case 'w':
case 'W': case 'W':
mode = mode & INV_WRITE; mode |= INV_WRITE;
break; break;
default: default:
Tcl_AppendResult(interp, "mode argument must be 'r', 'w', or 'rw'", 0); Tcl_AppendResult(interp, "mode argument must be 'r', 'w', or 'rw'", 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment