Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dEGs3-0006iJ-EF for pgsql-hackers@arkaria.postgresql.org; Fri, 26 May 2017 15:09:43 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dEGs2-0001og-SE for pgsql-hackers@arkaria.postgresql.org; Fri, 26 May 2017 15:09:42 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dEGqX-0007T1-CJ for pgsql-hackers@postgresql.org; Fri, 26 May 2017 15:08:09 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dEGqU-00052m-Ux for pgsql-hackers@postgresql.org; Fri, 26 May 2017 15:08:08 +0000 Received: from pro.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v4QF856Z011103; Fri, 26 May 2017 11:08:06 -0400 From: Tom Lane To: Daniel Gustafsson cc: PostgreSQL mailing lists Subject: Re: Bug when dumping "empty" operator classes In-reply-to: References: Comments: In-reply-to Daniel Gustafsson message dated "Fri, 26 May 2017 14:36:38 +0200" Date: Fri, 26 May 2017 11:08:05 -0400 Message-ID: <30099.1495811285@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Daniel Gustafsson writes: > While hacking on pg_upgrade in downstream Greenplum I ran into an error which > seems like an old, and obscure, bug in pg_dump (unrelated to pg_upgrade). > pg_dump generates incorrect SQL for an operator class which has no operators or > procedures, and which has the same column and storage types. Good catch. > The attached patch adds a belts-and-suspenders check in dumpOpclass() which > appends the STORAGE clause in case nothing had been added. Seems reasonable (the comment could use some wordsmithing maybe) ... > ... The DROP in > alter_generic is also removed to exercise the code path, being able to > pg_upgrade what is executed in regression seem like a good idea. ... but that's a nonstarter. We can't have the regression tests leaving global objects (users) lying around. I'll commit and back-patch this without a test case. Possibly Frost will be excited enough about it to add something to the pg_dump TAP tests, but those tests are too opaque for me to want to do so. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers