Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gVR9o-0004bk-5t for pgsql-hackers@arkaria.postgresql.org; Sat, 08 Dec 2018 01:11:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gVR9m-0007C1-SQ for pgsql-hackers@arkaria.postgresql.org; Sat, 08 Dec 2018 01:11:46 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gVR9m-0007Bt-Kt for pgsql-hackers@lists.postgresql.org; Sat, 08 Dec 2018 01:11:46 +0000 Received: from tamriel.snowman.net ([2001:470:e38f::11]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gVR9j-0006v6-VU for pgsql-hackers@lists.postgresql.org; Sat, 08 Dec 2018 01:11:46 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 4638B5F7A5; Fri, 7 Dec 2018 20:11:42 -0500 (EST) Date: Fri, 7 Dec 2018 20:11:42 -0500 From: Stephen Frost To: Michael Paquier Cc: Tom Lane , PostgreSQL mailing lists , Daniel Gustafsson Subject: Re: [HACKERS] Bug when dumping "empty" operator classes Message-ID: <20181208011142.GU3415@tamriel.snowman.net> References: <30099.1495811285@sss.pgh.pa.us> <1C694E4B-2458-45B5-B7FC-DF196CC9DB7A@yesql.se> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="EXB4IP8fXF5cMnjv" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --EXB4IP8fXF5cMnjv Content-Type: multipart/mixed; boundary="EmrNt6EAbr5IgiLK" Content-Disposition: inline --EmrNt6EAbr5IgiLK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Greetings, * Michael Paquier (michael.paquier@gmail.com) wrote: > On Fri, May 26, 2017 at 8:14 AM, Daniel Gustafsson wrot= e: > >> On 26 May 2017, at 17:08, Tom Lane wrote: > >> I'll commit and back-patch this without a test case. Possibly Frost w= ill > >> 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. >=20 > For the TAP tests I think that you are looking for something like the > attached. Stephen, perhaps you could consider including this test in > the suite? Another blast from the past. I've updated this to the new pg_dump test-suite system but otherwise it's basically the same test. Barring concerns, I'll plan to push this later this weekend. Thanks! Stephen --EmrNt6EAbr5IgiLK Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="add-empty-op-class-pg_dump-test-v1_master.patch" Content-Transfer-Encoding: quoted-printable diff --git a/src/bin/pg_dump/t/002_pg_dump.pl b/src/bin/pg_dump/t/002_pg_du= mp.pl new file mode 100644 index 2afd950..c687f0f *** a/src/bin/pg_dump/t/002_pg_dump.pl --- b/src/bin/pg_dump/t/002_pg_dump.pl *************** my %tests =3D ( *** 1521,1526 **** --- 1521,1541 ---- unlike =3D> { exclude_dump_test_schema =3D> 1, }, }, =20 + 'CREATE OPERATOR CLASS dump_test.op_class_empty' =3D> { + create_order =3D> 89, + create_sql =3D> 'CREATE OPERATOR CLASS dump_test.op_class_empty + FOR TYPE bigint USING btree FAMILY dump_test.op_family + AS STORAGE bigint;', + regexp =3D> qr/^ + \QCREATE OPERATOR CLASS dump_test.op_class_empty\E\n\s+ + \QFOR TYPE bigint USING btree FAMILY dump_test.op_family AS\E\n\s+ + \QSTORAGE bigint;\E + /xm, + like =3D> + { %full_runs, %dump_test_schema_runs, section_pre_data =3D> 1, }, + unlike =3D> { exclude_dump_test_schema =3D> 1, }, + }, +=20 'CREATE EVENT TRIGGER test_event_trigger' =3D> { create_order =3D> 33, create_sql =3D> 'CREATE EVENT TRIGGER test_event_trigger --EmrNt6EAbr5IgiLK-- --EXB4IP8fXF5cMnjv Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJcCxpNAAoJEO1sijiDR2RVgIQP/3klrMqozz15nl6HuGnSD+Xu Wfhp8s4E5mjPqoOJI+gWE6Tzz0lY5rNTIkDz+zmJmrKw/wSn7u/skLhvwUM4w+kY KEdKFnfSQQ8YpEM/OhACWv7bKdEYH+hTa2WzUszownEY5SbaZDDKoXSvBl7aamA3 YRIc3DtWdAvGUDcXXv1erdvPTvmfTeq5UAMwBS5Hx9W4T/5OX73AuZKJyA7QBaOI 419MtBvd7KBa4ed/iy1nCvw3dVmYXIsMVmfEOxv/NqHq34DbxdZlm3wLVeEnih+w UC6Eqa0REHPx8T+Enbx6abvJdFtITz9L2o5Qu1bi9qADpLKkuOqHbm5UmY36gOP9 Xp+eftLnCEGviN6yj+pUTgXfm8npC+G4Dh1kk37QZ8JJwiaTsUF7fgy3J++eyp9H sdXVVtOrfPJRXKSHCqk5DKT6K6eISme/5WGorU33Ma+snQUGjpFWC4Ifim3lQfBh hTki6jWj1ZLYzsTV1G+oR59wDFMLGLJZbvKhUKgRDkbuU0ahILA1hiKo/U95/eUZ H89a4GI7tp5w8UaR16iI/mLFSw6l3NFuA8hXQs4vE+dhvEwpKWlCscoTQGt7a30A nTzvBwVwCrPpsRRIy3HbkaDA6XGFfEwm4PX/dHx53BOODgqDb+V7xsJIcMZQ/nqk FIq2ZNmuvbiuR6HvhQml =FXJJ -----END PGP SIGNATURE----- --EXB4IP8fXF5cMnjv--