diff options
Diffstat (limited to 'src/test/regress/sql/misc_functions.sql')
-rw-r--r-- | src/test/regress/sql/misc_functions.sql | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/test/regress/sql/misc_functions.sql b/src/test/regress/sql/misc_functions.sql index 7a71f7659ce..02d1fc238d5 100644 --- a/src/test/regress/sql/misc_functions.sql +++ b/src/test/regress/sql/misc_functions.sql @@ -31,6 +31,26 @@ SELECT num_nonnulls(); SELECT num_nulls(); -- +-- Test some built-in SRFs +-- +-- The outputs of these are variable, so we can't just print their results +-- directly, but we can at least verify that the code doesn't fail. +-- +select setting as segsize +from pg_settings where name = 'wal_segment_size' +\gset + +select count(*) > 0 as ok from pg_ls_waldir(); +-- Test ProjectSet as well as FunctionScan +select count(*) > 0 as ok from (select pg_ls_waldir()) ss; +-- Test not-run-to-completion cases. +select * from pg_ls_waldir() limit 0; +select count(*) > 0 as ok from (select * from pg_ls_waldir() limit 1) ss; +select (pg_ls_waldir()).size = :segsize as ok limit 1; + +select count(*) >= 0 as ok from pg_ls_archive_statusdir(); + +-- -- Test adding a support function to a subject function -- |