|
429 | 429 | unlike => {
|
430 | 430 | no_privs => 1,
|
431 | 431 | pg_dumpall_globals => 1,
|
432 |
| - section_post_data => 1, }, },); |
| 432 | + section_post_data => 1, }, }, |
| 433 | + # Objects included in extension part of a schema created by this extension */ |
| 434 | + 'CREATE TABLE regress_pg_dump_schema.test_table' => { |
| 435 | + regexp => qr/^ |
| 436 | + \QCREATE TABLE test_table (\E |
| 437 | + \n\s+\Qcol1 integer,\E |
| 438 | + \n\s+\Qcol2 integer\E |
| 439 | + \n\);$/xm, |
| 440 | + like => { binary_upgrade => 1, }, |
| 441 | + unlike => { |
| 442 | + clean => 1, |
| 443 | + clean_if_exists => 1, |
| 444 | + createdb => 1, |
| 445 | + defaults => 1, |
| 446 | + no_privs => 1, |
| 447 | + no_owner => 1, |
| 448 | + pg_dumpall_globals => 1, |
| 449 | + schema_only => 1, |
| 450 | + section_pre_data => 1, |
| 451 | + section_post_data => 1, }, }, |
| 452 | + 'GRANT SELECT ON regress_pg_dump_schema.test_table' => { |
| 453 | + regexp => qr/^ |
| 454 | + \QSELECT pg_catalog.binary_upgrade_set_record_init_privs(true);\E\n |
| 455 | + \QGRANT SELECT ON TABLE test_table TO regress_dump_test_role;\E\n |
| 456 | + \QSELECT pg_catalog.binary_upgrade_set_record_init_privs(false);\E |
| 457 | + $/xms, |
| 458 | + like => { binary_upgrade => 1, }, |
| 459 | + unlike => { |
| 460 | + clean => 1, |
| 461 | + clean_if_exists => 1, |
| 462 | + createdb => 1, |
| 463 | + defaults => 1, |
| 464 | + no_owner => 1, |
| 465 | + no_privs => 1, |
| 466 | + pg_dumpall_globals => 1, |
| 467 | + schema_only => 1, |
| 468 | + section_pre_data => 1, |
| 469 | + section_post_data => 1, }, }, |
| 470 | + 'CREATE SEQUENCE regress_pg_dump_schema.test_seq' => { |
| 471 | + regexp => qr/^ |
| 472 | + \QCREATE SEQUENCE test_seq\E |
| 473 | + \n\s+\QSTART WITH 1\E |
| 474 | + \n\s+\QINCREMENT BY 1\E |
| 475 | + \n\s+\QNO MINVALUE\E |
| 476 | + \n\s+\QNO MAXVALUE\E |
| 477 | + \n\s+\QCACHE 1;\E |
| 478 | + $/xm, |
| 479 | + like => { binary_upgrade => 1, }, |
| 480 | + unlike => { |
| 481 | + clean => 1, |
| 482 | + clean_if_exists => 1, |
| 483 | + createdb => 1, |
| 484 | + defaults => 1, |
| 485 | + no_privs => 1, |
| 486 | + no_owner => 1, |
| 487 | + pg_dumpall_globals => 1, |
| 488 | + schema_only => 1, |
| 489 | + section_pre_data => 1, |
| 490 | + section_post_data => 1, }, }, |
| 491 | + 'GRANT USAGE ON regress_pg_dump_schema.test_seq' => { |
| 492 | + regexp => qr/^ |
| 493 | + \QSELECT pg_catalog.binary_upgrade_set_record_init_privs(true);\E\n |
| 494 | + \QGRANT USAGE ON SEQUENCE test_seq TO regress_dump_test_role;\E\n |
| 495 | + \QSELECT pg_catalog.binary_upgrade_set_record_init_privs(false);\E |
| 496 | + $/xms, |
| 497 | + like => { binary_upgrade => 1, }, |
| 498 | + unlike => { |
| 499 | + clean => 1, |
| 500 | + clean_if_exists => 1, |
| 501 | + createdb => 1, |
| 502 | + defaults => 1, |
| 503 | + no_owner => 1, |
| 504 | + no_privs => 1, |
| 505 | + pg_dumpall_globals => 1, |
| 506 | + schema_only => 1, |
| 507 | + section_pre_data => 1, |
| 508 | + section_post_data => 1, }, }, |
| 509 | + 'CREATE TYPE regress_pg_dump_schema.test_type' => { |
| 510 | + regexp => qr/^ |
| 511 | + \QCREATE TYPE test_type AS (\E |
| 512 | + \n\s+\Qcol1 integer\E |
| 513 | + \n\);$/xm, |
| 514 | + like => { binary_upgrade => 1, }, |
| 515 | + unlike => { |
| 516 | + clean => 1, |
| 517 | + clean_if_exists => 1, |
| 518 | + createdb => 1, |
| 519 | + defaults => 1, |
| 520 | + no_privs => 1, |
| 521 | + no_owner => 1, |
| 522 | + pg_dumpall_globals => 1, |
| 523 | + schema_only => 1, |
| 524 | + section_pre_data => 1, |
| 525 | + section_post_data => 1, }, }, |
| 526 | + 'GRANT USAGE ON regress_pg_dump_schema.test_type' => { |
| 527 | + regexp => qr/^ |
| 528 | + \QSELECT pg_catalog.binary_upgrade_set_record_init_privs(true);\E\n |
| 529 | + \QGRANT ALL ON TYPE test_type TO regress_dump_test_role;\E\n |
| 530 | + \QSELECT pg_catalog.binary_upgrade_set_record_init_privs(false);\E |
| 531 | + $/xms, |
| 532 | + like => { binary_upgrade => 1, }, |
| 533 | + unlike => { |
| 534 | + clean => 1, |
| 535 | + clean_if_exists => 1, |
| 536 | + createdb => 1, |
| 537 | + defaults => 1, |
| 538 | + no_owner => 1, |
| 539 | + no_privs => 1, |
| 540 | + pg_dumpall_globals => 1, |
| 541 | + schema_only => 1, |
| 542 | + section_pre_data => 1, |
| 543 | + section_post_data => 1, }, }, |
| 544 | + 'CREATE FUNCTION regress_pg_dump_schema.test_func' => { |
| 545 | + regexp => qr/^ |
| 546 | + \QCREATE FUNCTION test_func() RETURNS integer\E |
| 547 | + \n\s+\QLANGUAGE sql\E |
| 548 | + $/xm, |
| 549 | + like => { binary_upgrade => 1, }, |
| 550 | + unlike => { |
| 551 | + clean => 1, |
| 552 | + clean_if_exists => 1, |
| 553 | + createdb => 1, |
| 554 | + defaults => 1, |
| 555 | + no_privs => 1, |
| 556 | + no_owner => 1, |
| 557 | + pg_dumpall_globals => 1, |
| 558 | + schema_only => 1, |
| 559 | + section_pre_data => 1, |
| 560 | + section_post_data => 1, }, }, |
| 561 | + 'GRANT ALL ON regress_pg_dump_schema.test_func' => { |
| 562 | + regexp => qr/^ |
| 563 | + \QSELECT pg_catalog.binary_upgrade_set_record_init_privs(true);\E\n |
| 564 | + \QGRANT ALL ON FUNCTION test_func() TO regress_dump_test_role;\E\n |
| 565 | + \QSELECT pg_catalog.binary_upgrade_set_record_init_privs(false);\E |
| 566 | + $/xms, |
| 567 | + like => { binary_upgrade => 1, }, |
| 568 | + unlike => { |
| 569 | + clean => 1, |
| 570 | + clean_if_exists => 1, |
| 571 | + createdb => 1, |
| 572 | + defaults => 1, |
| 573 | + no_owner => 1, |
| 574 | + no_privs => 1, |
| 575 | + pg_dumpall_globals => 1, |
| 576 | + schema_only => 1, |
| 577 | + section_pre_data => 1, |
| 578 | + section_post_data => 1, }, }, |
| 579 | + 'CREATE AGGREGATE regress_pg_dump_schema.test_agg' => { |
| 580 | + regexp => qr/^ |
| 581 | + \QCREATE AGGREGATE test_agg(smallint) (\E |
| 582 | + \n\s+\QSFUNC = int2_sum,\E |
| 583 | + \n\s+\QSTYPE = bigint\E |
| 584 | + \n\);$/xm, |
| 585 | + like => { binary_upgrade => 1, }, |
| 586 | + unlike => { |
| 587 | + clean => 1, |
| 588 | + clean_if_exists => 1, |
| 589 | + createdb => 1, |
| 590 | + defaults => 1, |
| 591 | + no_privs => 1, |
| 592 | + no_owner => 1, |
| 593 | + pg_dumpall_globals => 1, |
| 594 | + schema_only => 1, |
| 595 | + section_pre_data => 1, |
| 596 | + section_post_data => 1, }, }, |
| 597 | + 'GRANT ALL ON regress_pg_dump_schema.test_agg' => { |
| 598 | + regexp => qr/^ |
| 599 | + \QSELECT pg_catalog.binary_upgrade_set_record_init_privs(true);\E\n |
| 600 | + \QGRANT ALL ON FUNCTION test_agg(smallint) TO regress_dump_test_role;\E\n |
| 601 | + \QSELECT pg_catalog.binary_upgrade_set_record_init_privs(false);\E |
| 602 | + $/xms, |
| 603 | + like => { binary_upgrade => 1, }, |
| 604 | + unlike => { |
| 605 | + clean => 1, |
| 606 | + clean_if_exists => 1, |
| 607 | + createdb => 1, |
| 608 | + defaults => 1, |
| 609 | + no_owner => 1, |
| 610 | + no_privs => 1, |
| 611 | + pg_dumpall_globals => 1, |
| 612 | + schema_only => 1, |
| 613 | + section_pre_data => 1, |
| 614 | + section_post_data => 1, }, }, |
| 615 | + # Objects not included in extension, part of schema created by extension |
| 616 | + 'CREATE TABLE regress_pg_dump_schema.external_tab' => { |
| 617 | + create_order => 4, |
| 618 | + create_sql => 'CREATE TABLE regress_pg_dump_schema.external_tab |
| 619 | + (col1 int);', |
| 620 | + regexp => qr/^ |
| 621 | + \QCREATE TABLE external_tab (\E |
| 622 | + \n\s+\Qcol1 integer\E |
| 623 | + \n\);$/xm, |
| 624 | + like => { |
| 625 | + binary_upgrade => 1, |
| 626 | + clean => 1, |
| 627 | + clean_if_exists => 1, |
| 628 | + createdb => 1, |
| 629 | + defaults => 1, |
| 630 | + no_owner => 1, |
| 631 | + no_privs => 1, |
| 632 | + schema_only => 1, |
| 633 | + section_pre_data => 1, }, |
| 634 | + unlike => { |
| 635 | + pg_dumpall_globals => 1, |
| 636 | + section_post_data => 1, }, }, ); |
433 | 637 |
|
434 | 638 | #########################################
|
435 | 639 | # Create a PG instance to test actually dumping from
|
|
0 commit comments