Add pg_dump test for empty OP class
authorStephen Frost <[email protected]>
Mon, 10 Dec 2018 15:13:52 +0000 (10:13 -0500)
committerStephen Frost <[email protected]>
Mon, 10 Dec 2018 15:13:52 +0000 (10:13 -0500)
This adds a pg_dump test for an empty operator class.

Author: Michael Paquier
Discussion: https://postgr.es/m/20181208011142[email protected]

src/bin/pg_dump/t/002_pg_dump.pl

index 8f4bb554dfe25a18b83186f8114b6f96d376b0aa..46dbb078cf636d4864cdab570135cc8775b7934b 100644 (file)
@@ -1521,6 +1521,21 @@ my %tests = (
                unlike => { exclude_dump_test_schema => 1, },
        },
 
+       'CREATE OPERATOR CLASS dump_test.op_class_empty' => {
+               create_order => 89,
+               create_sql   => 'CREATE OPERATOR CLASS dump_test.op_class_empty
+                                FOR TYPE bigint USING btree FAMILY dump_test.op_family
+                                                AS STORAGE bigint;',
+               regexp => 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 =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+               unlike => { exclude_dump_test_schema => 1, },
+       },
+
        'CREATE EVENT TRIGGER test_event_trigger' => {
                create_order => 33,
                create_sql   => 'CREATE EVENT TRIGGER test_event_trigger