Re: Bug #778: pg_dump crashes when dumping a view - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Bug #778: pg_dump crashes when dumping a view
Date
Msg-id 3863.1032558928@sss.pgh.pa.us
Whole thread Raw
In response to Bug #778: pg_dump crashes when dumping a view  (pgsql-bugs@postgresql.org)
List pgsql-bugs
pgsql-bugs@postgresql.org writes:
> pg_dump crashes when trying to dump a certain database structure.

Looks like this was broken by a late change in the 7.2 querytree
structure.  There is no comparable bug in 7.3devel (because that whole
piece of code got rewritten), but if you need a patch here it is.

> PostgreSQL version: 7.2.1-3 (Debian package version, that is, 3rd build)

I'd recommend updating to 7.2.2 while you're at it; this patch is
against the 7.2.2 version of ruleutils.c.

            regards, tom lane


*** src/backend/utils/adt/ruleutils.c.orig    Sat Jun 15 14:38:10 2002
--- src/backend/utils/adt/ruleutils.c    Fri Sep 20 17:37:07 2002
***************
*** 1608,1613 ****
--- 1608,1624 ----
          if (!phony_equal(a->expr, b->expr, levelsup))
              return false;
          if (!phony_equal(a->result, b->result, levelsup))
+             return false;
+         return true;
+     }
+     if (IsA(expr1, NullTest))
+     {
+         NullTest   *a = (NullTest *) expr1;
+         NullTest   *b = (NullTest *) expr2;
+
+         if (!phony_equal(a->arg, b->arg, levelsup))
+             return false;
+         if (a->nulltesttype != b->nulltesttype)
              return false;
          return true;
      }

pgsql-bugs by date:

Previous
From: pgsql-bugs@postgresql.org
Date:
Subject: Bug #778: pg_dump crashes when dumping a view
Next
From: Deron Brookins
Date:
Subject: Re: Fix for PSQL 7.2.2 doesn't compile on OS X 10.2