Skip to content

Commit a93077e

Browse files
committed
Add pg_dump tests for CREATE STATISTICS
CREATE STATISTICS pg_dump support code was not covered at all by previous tests. Discussion: https://postgr.es/m/20170503172746.rwftidszir67sgk7@alvherre.pgsql
1 parent 698923d commit a93077e

File tree

1 file changed

+68
-0
lines changed

1 file changed

+68
-0
lines changed

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

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4920,6 +4920,74 @@
49204920
role => 1,
49214921
section_post_data => 1, }, },
49224922
4923+
'CREATE STATISTICS extended_stats_no_options' => {
4924+
all_runs => 1,
4925+
catch_all => 'CREATE ... commands',
4926+
create_order => 97,
4927+
create_sql => 'CREATE STATISTICS dump_test.test_ext_stats_no_options
4928+
ON (col1, col2) FROM dump_test.test_fifth_table',
4929+
regexp => qr/^
4930+
\QCREATE STATISTICS dump_test.test_ext_stats_no_options ON (col1, col2) FROM test_fifth_table;\E
4931+
/xms,
4932+
like => {
4933+
binary_upgrade => 1,
4934+
clean => 1,
4935+
clean_if_exists => 1,
4936+
createdb => 1,
4937+
defaults => 1,
4938+
exclude_test_table => 1,
4939+
exclude_test_table_data => 1,
4940+
no_blobs => 1,
4941+
no_privs => 1,
4942+
no_owner => 1,
4943+
only_dump_test_schema => 1,
4944+
pg_dumpall_dbprivs => 1,
4945+
schema_only => 1,
4946+
section_post_data => 1,
4947+
test_schema_plus_blobs => 1,
4948+
with_oids => 1, },
4949+
unlike => {
4950+
exclude_dump_test_schema => 1,
4951+
only_dump_test_table => 1,
4952+
pg_dumpall_globals => 1,
4953+
pg_dumpall_globals_clean => 1,
4954+
role => 1,
4955+
section_pre_data => 1, }, },
4956+
4957+
'CREATE STATISTICS extended_stats_options' => {
4958+
all_runs => 1,
4959+
catch_all => 'CREATE ... commands',
4960+
create_order => 97,
4961+
create_sql => 'CREATE STATISTICS dump_test.test_ext_stats_using
4962+
WITH (ndistinct) ON (col1, col2) FROM dump_test.test_fifth_table',
4963+
regexp => qr/^
4964+
\QCREATE STATISTICS dump_test.test_ext_stats_using WITH (ndistinct) ON (col1, col2) FROM test_fifth_table;\E
4965+
/xms,
4966+
like => {
4967+
binary_upgrade => 1,
4968+
clean => 1,
4969+
clean_if_exists => 1,
4970+
createdb => 1,
4971+
defaults => 1,
4972+
exclude_test_table => 1,
4973+
exclude_test_table_data => 1,
4974+
no_blobs => 1,
4975+
no_privs => 1,
4976+
no_owner => 1,
4977+
only_dump_test_schema => 1,
4978+
pg_dumpall_dbprivs => 1,
4979+
schema_only => 1,
4980+
section_post_data => 1,
4981+
test_schema_plus_blobs => 1,
4982+
with_oids => 1, },
4983+
unlike => {
4984+
exclude_dump_test_schema => 1,
4985+
only_dump_test_table => 1,
4986+
pg_dumpall_globals => 1,
4987+
pg_dumpall_globals_clean => 1,
4988+
role => 1,
4989+
section_pre_data => 1, }, },
4990+
49234991
'CREATE SEQUENCE test_table_col1_seq' => {
49244992
all_runs => 1,
49254993
catch_all => 'CREATE ... commands',

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy