Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7dde987

Browse files
committed
Double-space commands in system_constraints.sql/system_functions.sql.
Previously, any error reported by the backend while readingsystem_constraints.sql would report the entire file, not just theparticular command it was working on. (Ask me how I know.) Likewise,there were chunks of system_functions.sql that would be read as onecommand, which would be annoying if anything failed there.The issue for system_constraints.sql is an oversight in commitdfb75e4. I didn't try to trace down where the poor formattingin system_functions.sql started, but it's certainly contrary tothe advice at the head of that file.
1 parent1f9b0e6 commit7dde987

File tree

2 files changed

+49
-1
lines changed

2 files changed

+49
-1
lines changed

‎src/backend/catalog/genbki.pl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,8 @@
678678

679679
foreachmy$c (@system_constraints)
680680
{
681-
print$constraints$c,"\n";
681+
# leave blank lines to localize any bootstrap error messages better
682+
print$constraints$c,"\n\n";
682683
}
683684

684685
# Now generate schemapg.h

‎src/backend/catalog/system_functions.sql

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -607,72 +607,119 @@ AS 'unicode_is_normalized';
607607
-- can later change who can access these functions, or leave them as only
608608
-- available to superuser / cluster owner, if they choose.
609609
--
610+
610611
REVOKE EXECUTEON FUNCTION pg_start_backup(text,boolean,boolean)FROM public;
612+
611613
REVOKE EXECUTEON FUNCTION pg_stop_backup()FROM public;
614+
612615
REVOKE EXECUTEON FUNCTION pg_stop_backup(boolean,boolean)FROM public;
616+
613617
REVOKE EXECUTEON FUNCTION pg_create_restore_point(text)FROM public;
618+
614619
REVOKE EXECUTEON FUNCTION pg_switch_wal()FROM public;
620+
615621
REVOKE EXECUTEON FUNCTION pg_wal_replay_pause()FROM public;
622+
616623
REVOKE EXECUTEON FUNCTION pg_wal_replay_resume()FROM public;
624+
617625
REVOKE EXECUTEON FUNCTION pg_rotate_logfile()FROM public;
626+
618627
REVOKE EXECUTEON FUNCTION pg_reload_conf()FROM public;
628+
619629
REVOKE EXECUTEON FUNCTION pg_current_logfile()FROM public;
630+
620631
REVOKE EXECUTEON FUNCTION pg_current_logfile(text)FROM public;
632+
621633
REVOKE EXECUTEON FUNCTION pg_promote(boolean,integer)FROM public;
622634

623635
REVOKE EXECUTEON FUNCTION pg_stat_reset()FROM public;
636+
624637
REVOKE EXECUTEON FUNCTION pg_stat_reset_shared(text)FROM public;
638+
625639
REVOKE EXECUTEON FUNCTION pg_stat_reset_slru(text)FROM public;
640+
626641
REVOKE EXECUTEON FUNCTION pg_stat_reset_single_table_counters(oid)FROM public;
642+
627643
REVOKE EXECUTEON FUNCTION pg_stat_reset_single_function_counters(oid)FROM public;
644+
628645
REVOKE EXECUTEON FUNCTION pg_stat_reset_replication_slot(text)FROM public;
629646

630647
REVOKE EXECUTEON FUNCTION lo_import(text)FROM public;
648+
631649
REVOKE EXECUTEON FUNCTION lo_import(text,oid)FROM public;
650+
632651
REVOKE EXECUTEON FUNCTION lo_export(oid,text)FROM public;
633652

634653
REVOKE EXECUTEON FUNCTION pg_ls_logdir()FROM public;
654+
635655
REVOKE EXECUTEON FUNCTION pg_ls_waldir()FROM public;
656+
636657
REVOKE EXECUTEON FUNCTION pg_ls_archive_statusdir()FROM public;
658+
637659
REVOKE EXECUTEON FUNCTION pg_ls_tmpdir()FROM public;
660+
638661
REVOKE EXECUTEON FUNCTION pg_ls_tmpdir(oid)FROM public;
639662

640663
REVOKE EXECUTEON FUNCTION pg_read_file(text)FROM public;
664+
641665
REVOKE EXECUTEON FUNCTION pg_read_file(text,bigint,bigint)FROM public;
666+
642667
REVOKE EXECUTEON FUNCTION pg_read_file(text,bigint,bigint,boolean)FROM public;
643668

644669
REVOKE EXECUTEON FUNCTION pg_read_binary_file(text)FROM public;
670+
645671
REVOKE EXECUTEON FUNCTION pg_read_binary_file(text,bigint,bigint)FROM public;
672+
646673
REVOKE EXECUTEON FUNCTION pg_read_binary_file(text,bigint,bigint,boolean)FROM public;
647674

648675
REVOKE EXECUTEON FUNCTION pg_replication_origin_advance(text, pg_lsn)FROM public;
676+
649677
REVOKE EXECUTEON FUNCTION pg_replication_origin_create(text)FROM public;
678+
650679
REVOKE EXECUTEON FUNCTION pg_replication_origin_drop(text)FROM public;
680+
651681
REVOKE EXECUTEON FUNCTION pg_replication_origin_oid(text)FROM public;
682+
652683
REVOKE EXECUTEON FUNCTION pg_replication_origin_progress(text,boolean)FROM public;
684+
653685
REVOKE EXECUTEON FUNCTION pg_replication_origin_session_is_setup()FROM public;
686+
654687
REVOKE EXECUTEON FUNCTION pg_replication_origin_session_progress(boolean)FROM public;
688+
655689
REVOKE EXECUTEON FUNCTION pg_replication_origin_session_reset()FROM public;
690+
656691
REVOKE EXECUTEON FUNCTION pg_replication_origin_session_setup(text)FROM public;
692+
657693
REVOKE EXECUTEON FUNCTION pg_replication_origin_xact_reset()FROM public;
694+
658695
REVOKE EXECUTEON FUNCTION pg_replication_origin_xact_setup(pg_lsn,timestamp with time zone)FROM public;
696+
659697
REVOKE EXECUTEON FUNCTION pg_show_replication_origin_status()FROM public;
660698

661699
REVOKE EXECUTEON FUNCTION pg_stat_file(text)FROM public;
700+
662701
REVOKE EXECUTEON FUNCTION pg_stat_file(text,boolean)FROM public;
663702

664703
REVOKE EXECUTEON FUNCTION pg_ls_dir(text)FROM public;
704+
665705
REVOKE EXECUTEON FUNCTION pg_ls_dir(text,boolean,boolean)FROM public;
666706

667707
--
668708
-- We also set up some things as accessible to standard roles.
669709
--
710+
670711
GRANT EXECUTEON FUNCTION pg_ls_logdir() TO pg_monitor;
712+
671713
GRANT EXECUTEON FUNCTION pg_ls_waldir() TO pg_monitor;
714+
672715
GRANT EXECUTEON FUNCTION pg_ls_archive_statusdir() TO pg_monitor;
716+
673717
GRANT EXECUTEON FUNCTION pg_ls_tmpdir() TO pg_monitor;
718+
674719
GRANT EXECUTEON FUNCTION pg_ls_tmpdir(oid) TO pg_monitor;
675720

676721
GRANT pg_read_all_settings TO pg_monitor;
722+
677723
GRANT pg_read_all_stats TO pg_monitor;
724+
678725
GRANT pg_stat_scan_tables TO pg_monitor;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp