diff options
author | Tom Lane | 2022-07-30 15:17:07 +0000 |
---|---|---|
committer | Tom Lane | 2022-07-30 15:17:07 +0000 |
commit | d10fad96c664a503a4203fc4b5acd4e816b0158a (patch) | |
tree | 4e4decc93318ad7f1cc4c3192dfebd4edda580e9 /src/test/regress/expected/misc_functions.out | |
parent | 212bdc0cbc32ae5041bf1cd609f7b7a0c8930fc3 (diff) |
Adjust new pg_read_file() test cases for more portability.
It's allowed for an installation to remove postgresql.auto.conf,
so don't rely on that being present. Instead probe whether we can
read postmaster.pid. (If you've removed that, you broke the data
directory's multiple-postmaster interlock, not to mention pg_ctl.)
Per gripe from Michael Paquier.
Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'src/test/regress/expected/misc_functions.out')
-rw-r--r-- | src/test/regress/expected/misc_functions.out | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/test/regress/expected/misc_functions.out b/src/test/regress/expected/misc_functions.out index ca82d91f1af..9f106c2a108 100644 --- a/src/test/regress/expected/misc_functions.out +++ b/src/test/regress/expected/misc_functions.out @@ -373,16 +373,16 @@ select count(*) >= 0 as ok from pg_ls_archive_statusdir(); (1 row) -- pg_read_file() -select length(pg_read_file('postgresql.auto.conf')) > 30; +select length(pg_read_file('postmaster.pid')) > 20; ?column? ---------- t (1 row) -select length(pg_read_file('postgresql.auto.conf', 1, 30)); +select length(pg_read_file('postmaster.pid', 1, 20)); length -------- - 30 + 20 (1 row) -- Test missing_ok @@ -400,16 +400,16 @@ ERROR: requested length cannot be negative select pg_read_file('does not exist', 0, -1, true); -- error ERROR: requested length cannot be negative -- pg_read_binary_file() -select length(pg_read_binary_file('postgresql.auto.conf')) > 30; +select length(pg_read_binary_file('postmaster.pid')) > 20; ?column? ---------- t (1 row) -select length(pg_read_binary_file('postgresql.auto.conf', 1, 30)); +select length(pg_read_binary_file('postmaster.pid', 1, 20)); length -------- - 30 + 20 (1 row) -- Test missing_ok @@ -427,7 +427,7 @@ ERROR: requested length cannot be negative select pg_read_binary_file('does not exist', 0, -1, true); -- error ERROR: requested length cannot be negative -- pg_stat_file() -select size > 30, isdir from pg_stat_file('postgresql.auto.conf'); +select size > 20, isdir from pg_stat_file('postmaster.pid'); ?column? | isdir ----------+------- t | f |