Scaffolding for diagnostic function(s)
This commit is contained in:
parent
d5b3953568
commit
4100b66f3b
12
scripts-available/CDB_FederatedServerDiagnostics.sql
Normal file
12
scripts-available/CDB_FederatedServerDiagnostics.sql
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
--------------------------------------------------------------------------------
|
||||||
|
-- Public functions
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
CREATE OR REPLACE FUNCTION @extschema@.CDB_Federated_Server_Diagnostics(server TEXT)
|
||||||
|
RETURNS json -- TODO decide if json or jsonb
|
||||||
|
AS $$
|
||||||
|
BEGIN
|
||||||
|
RETURN '{}'::json;
|
||||||
|
END
|
||||||
|
$$
|
||||||
|
LANGUAGE PLPGSQL VOLATILE PARALLEL UNSAFE;
|
1
scripts-enabled/403-CDB_FederatedServerDiagnostics.sql
Symbolic link
1
scripts-enabled/403-CDB_FederatedServerDiagnostics.sql
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../scripts-available/CDB_FederatedServerDiagnostics.sql
|
2
test/CDB_FederatedServerDiagnostics.sql
Normal file
2
test/CDB_FederatedServerDiagnostics.sql
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
\echo '%% It raises an error if the server does not exist'
|
||||||
|
SELECT '1.1', cartodb.CDB_Federated_Server_Diagnostics(server => 'doesNotExist');
|
2
test/CDB_FederatedServerDiagnostics_expect
Normal file
2
test/CDB_FederatedServerDiagnostics_expect
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
%% It raises an error if the server does not exist
|
||||||
|
1.1|{}
|
Loading…
Reference in New Issue
Block a user