Closed rafatower closed 5 years ago
Example usage (not included in the tests, as they can return json keys in different order):
SELECT cartodb.CDB_Federated_Server_Diagnostics(server => 'loopback');
cdb_federated_server_diagnostics
--------------------------------------------------------
{"server_version": "11.3", "postgis_version": "2.5.1"}
(1 row)
Thanks! I'll add the foreign server options before closing this, but wanna do the latency stuff in the separate ticket.
Added server_options
to the mix:
SELECT cartodb.CDB_Federated_Server_Diagnostics(server => 'loopback');
cdb_federated_server_diagnostics
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
{"server_options": {"host": "localhost", "port": "5432", "updatable": "false", "extensions": "postgis", "fetch_size": "1000", "use_remote_estimate": "true"}, "server_version": "11.3", "postgis_version": "2.5.1"}
(1 row)
I think this is now ready for review and merge.
@Algunenano you just need to look at the last commit https://github.com/CartoDB/cartodb-postgresql/pull/383/commits/d76e3ccc3e30358bd8bf2442ad0e4e917c58f248 and I can merge it into branch federated_function
Using the proposal from Algunenano, I added just a public function that is meant to be augmented with more info.
Here the interface