Adds cdb_cartodb_server schema

This commit is contained in:
Guido Fioravantti
2015-11-06 18:13:57 +01:00
parent 0297214c53
commit d772033b45
7 changed files with 29 additions and 29 deletions

View File

@@ -1,5 +1,5 @@
-- Check if a given host is up by performing a ping -c 1 call.
CREATE OR REPLACE FUNCTION check_host(hostname TEXT)
CREATE OR REPLACE FUNCTION cdb_geocoder_server._check_host(hostname TEXT)
RETURNS BOOLEAN
AS $$
import os
@@ -10,7 +10,7 @@ AS $$
$$ LANGUAGE plpythonu VOLATILE;
-- Returns current pwd
CREATE OR REPLACE FUNCTION pwd()
CREATE OR REPLACE FUNCTION cdb_geocoder_server._pwd()
RETURNS TEXT
AS $$
import os

View File

@@ -2,15 +2,7 @@
CREATE EXTENSION postgis;
CREATE EXTENSION schema_triggers;
CREATE EXTENSION plpythonu;
CREATE EXTENSION cartodb;
-- Install the extension
CREATE EXTENSION cdb_geocoder_server;
-- Mock the varnish invalidation function
CREATE OR REPLACE FUNCTION public.cdb_invalidate_varnish(table_name text) RETURNS void AS $$
BEGIN
RETURN;
END
$$
LANGUAGE plpgsql;

View File

@@ -1,5 +1,5 @@
-- Check that check_host is working
select check_host('cartodb.com');
select cdb_geocoder_server._check_host('cartodb.com');
-- Check that check_pwd is working
select pwd();
select cdb_geocoder_server._pwd();