Scaffolding for diagnostic function(s)

This commit is contained in:
Rafa de la Torre 2019-11-08 15:25:57 +01:00
parent d5b3953568
commit 4100b66f3b
4 changed files with 17 additions and 0 deletions

View 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;

View File

@ -0,0 +1 @@
../scripts-available/CDB_FederatedServerDiagnostics.sql

View 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');

View File

@ -0,0 +1,2 @@
%% It raises an error if the server does not exist
1.1|{}