diff options
| author | Stephen Frost | 2018-12-10 14:46:36 +0000 |
|---|---|---|
| committer | Stephen Frost | 2018-12-10 14:46:36 +0000 |
| commit | 2d7eeb1b14925fd4ba6d2d7012636489570eaee8 (patch) | |
| tree | 3e5662b0640376bdad8e0ec23a93244a5f9b4e34 /src/bin | |
| parent | 96c702c1edbde8a3f5013bd0ac6c25c85710258d (diff) | |
Add additional partition tests to pg_dump
This adds a few tests for non-inherited constraints.
Author: Amit Langote
Discussion: https://postgr.es/m/20181208001735.GT3415%40tamriel.snowman.net
Diffstat (limited to 'src/bin')
| -rw-r--r-- | src/bin/pg_dump/t/002_pg_dump.pl | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/bin/pg_dump/t/002_pg_dump.pl b/src/bin/pg_dump/t/002_pg_dump.pl index 2afd950591b..8f4bb554dfe 100644 --- a/src/bin/pg_dump/t/002_pg_dump.pl +++ b/src/bin/pg_dump/t/002_pg_dump.pl @@ -2246,12 +2246,16 @@ my %tests = ( create_order => 91, create_sql => 'CREATE TABLE dump_test_second_schema.measurement_y2006m2 - PARTITION OF dump_test.measurement FOR VALUES - FROM (\'2006-02-01\') TO (\'2006-03-01\');', + PARTITION OF dump_test.measurement ( + unitsales DEFAULT 0 CHECK (unitsales >= 0) + ) + FOR VALUES FROM (\'2006-02-01\') TO (\'2006-03-01\');', regexp => qr/^ \Q-- Name: measurement_y2006m2;\E.*\n \Q--\E\n\n - \QCREATE TABLE dump_test_second_schema.measurement_y2006m2 PARTITION OF dump_test.measurement\E\n + \QCREATE TABLE dump_test_second_schema.measurement_y2006m2 PARTITION OF dump_test.measurement (\E\n + \s+\QCONSTRAINT measurement_y2006m2_unitsales_check CHECK ((unitsales >= 0))\E\n + \)\n \QFOR VALUES FROM ('2006-02-01') TO ('2006-03-01');\E\n /xm, like => { |
