bdr: fix drops stuff for internal objects
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Wed, 14 May 2014 20:00:08 +0000 (16:00 -0400)
committerAndres Freund <andres@anarazel.de>
Thu, 3 Jul 2014 15:55:36 +0000 (17:55 +0200)
Things such as TOAST tables were causing errors when tables having them
were dropped.

contrib/bdr/bdr_apply.c

index fef93d23b06a68a0adbec03750463fb73eea281f..636d5dea2b438ceddc58d071c4578f9433811122 100644 (file)
@@ -1229,6 +1229,13 @@ process_queued_drop(HeapTuple cmdtup)
        type = TextDatumGetCString(datum);
        objtype = unstringify_objtype(type);
 
+       /*
+        * ignore objects that don't unstringify properly; those are
+        * "internal" objects anyway.
+        */
+       if (objtype == -1)
+           continue;
+
        if (objtype == OBJECT_TYPE ||
            objtype == OBJECT_DOMAIN)
        {