Skip to content

Commit

Permalink
tests++
Browse files Browse the repository at this point in the history
  • Loading branch information
lacanoid committed Jan 17, 2025
1 parent 91cec91 commit f0d7ce6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
8 changes: 2 additions & 6 deletions test/expected/linker.out
Original file line number Diff line number Diff line change
Expand Up @@ -124,18 +124,14 @@ truncate my_table2;
NOTICE: DATALINK UNLINK:/var/www/datalink/test1.txt
NOTICE: DATALINK UNLINK:/var/www/datalink/test2.txt
-- test for foreign servers
select * from datalink.curl_get('file://zala/etc/issue');
ERROR: DATALINK EXCEPTION - dblink extension required for files on foreign servers
CONTEXT: PL/Perl function "curl_get"
-- select * from datalink.curl_get('file://zala/etc/issue');
create extension dblink;
select * from datalink.curl_get('file://zala/etc/issue');
ERROR: DATALINK EXCEPTION - foreign server zala does not exist
CONTEXT: PL/Perl function "curl_get"
create extension postgres_fdw;
create server zala foreign data wrapper postgres_fdw options (dbname 'contrib_regression');
select * from datalink.curl_get('file://zala/etc/issue');
ERROR: user mapping not found for "root" at line 43.
CONTEXT: PL/Perl function "curl_get"
-- select * from datalink.curl_get('file://zala/etc/issue');
select * from datalink.curl_get('file://tiha/etc/issue');
ERROR: DATALINK EXCEPTION - foreign server tiha does not exist
CONTEXT: PL/Perl function "curl_get"
Expand Down
4 changes: 2 additions & 2 deletions test/sql/linker.sql
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ select dlvalue(filename)
truncate my_table2;

-- test for foreign servers
select * from datalink.curl_get('file://zala/etc/issue');
-- select * from datalink.curl_get('file://zala/etc/issue');
create extension dblink;
select * from datalink.curl_get('file://zala/etc/issue');
create extension postgres_fdw;
create server zala foreign data wrapper postgres_fdw options (dbname 'contrib_regression');
select * from datalink.curl_get('file://zala/etc/issue');
-- select * from datalink.curl_get('file://zala/etc/issue');
select * from datalink.curl_get('file://tiha/etc/issue');
create user mapping for current_user server zala;
select url,ok,rc,error from datalink.curl_get('file://zala/etc/issue');
Expand Down

0 comments on commit f0d7ce6

Please sign in to comment.