From 4ea2b8f556bff352cfc30613f040a08675eba1d2 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Mon, 3 Dec 2001 14:49:46 +0000 Subject: [PATCH] Pg_lo_open must OR together multiple modes, not AND them. Per report from Andreas Kretzer. --- src/interfaces/libpgtcl/pgtclCmds.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/interfaces/libpgtcl/pgtclCmds.c b/src/interfaces/libpgtcl/pgtclCmds.c index acd40895c7..af94a510bf 100644 --- a/src/interfaces/libpgtcl/pgtclCmds.c +++ b/src/interfaces/libpgtcl/pgtclCmds.c @@ -8,7 +8,7 @@ * * * 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[]) break; case 'r': case 'R': - mode = mode & INV_READ; + mode |= INV_READ; break; case 'w': case 'W': - mode = mode & INV_WRITE; + mode |= INV_WRITE; break; default: Tcl_AppendResult(interp, "mode argument must be 'r', 'w', or 'rw'", 0);