compatible_oper needs to do ReleaseSysCache in one path to avoid
authorTom Lane
Mon, 23 Apr 2001 04:32:30 +0000 (04:32 +0000)
committerTom Lane
Mon, 23 Apr 2001 04:32:30 +0000 (04:32 +0000)
complaints about 'Cache reference leak'.  Per report from Don Baccus.

src/backend/parser/parse_oper.c

index fdca83115d33958aa752125ae6c0e79c2f285811..b63c5c36a2f1ecdd6aeefd53a5aa1d26f2436006 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/parser/parse_oper.c,v 1.48 2001/03/22 03:59:41 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/parser/parse_oper.c,v 1.49 2001/04/23 04:32:30 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -686,6 +686,9 @@ compatible_oper(char *op, Oid arg1, Oid arg2, bool noError)
         IS_BINARY_COMPATIBLE(opform->oprright, arg2)))
        return optup;
 
+   /* nope... */
+   ReleaseSysCache(optup);
+
    if (!noError)
        op_error(op, arg1, arg2);