From: Tom Lane <tgl@sss.pgh.pa.us>
To: Daniel Gustafsson <daniel@yesql.se>
Cc: PostgreSQL mailing lists <pgsql-hackers@postgresql.org>
Subject: Re: Bug when dumping "empty" operator classes
Date: Fri, 26 May 2017 11:08:05 -0400
Message-ID: <30099.1495811285@sss.pgh.pa.us> (raw)
In-Reply-To: <D9E5FC64-7A37-4F3D-B946-7E4FB468F88A@yesql.se>
References: <D9E5FC64-7A37-4F3D-B946-7E4FB468F88A@yesql.se>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Daniel Gustafsson <daniel@yesql.se> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, daniel@yesql.se
Subject: Re: Bug when dumping "empty" operator classes
In-Reply-To: <30099.1495811285@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox