Merge remote-tracking branch 'carto/master' into 2273_support

2273_support
Raúl Marín 5 years ago
commit ecf0a06448

@ -16,9 +16,6 @@ jobs:
- env: POSTGRESQL_VERSION="11" POSTGIS_VERSION="2.5"
- env: POSTGRESQL_VERSION="12" POSTGIS_VERSION="2.5"
- env: POSTGRESQL_VERSION="12" POSTGIS_VERSION="3"
allow_failures:
- env: POSTGRESQL_VERSION="12" POSTGIS_VERSION="2.5"
- env: POSTGRESQL_VERSION="12" POSTGIS_VERSION="3"
script:
- sudo service postgresql stop;

@ -1,7 +1,7 @@
# cartodb/Makefile
EXTENSION = cartodb
EXTVERSION = 0.33.0
EXTVERSION = 0.34.0
SED = sed
AWK = awk
@ -106,6 +106,7 @@ UPGRADABLE = \
0.31.0 \
0.32.0 \
0.33.0 \
0.34.0 \
$(EXTVERSION)dev \
$(EXTVERSION)next \
$(END)
@ -139,9 +140,7 @@ PG_VERSION := $(shell $(PG_CONFIG) --version | $(AWK) '{split($$2,a,"."); print
PG_12_GE := $(shell [ $(PG_VERSION) -ge 12 ] && echo true)
PLPYTHONU := plpythonu
ifeq ($(PG_12_GE), true)
# Reverted until we are ready for PG12 support in other projects
PLPYTHONU := plpythonu
# PLPYTHONU := plpython3u
PLPYTHONU := plpython3u
endif
PGPORT ?= '5432'
PGUSER ?= 'postgres'

@ -1,3 +1,10 @@
0.35.0 (XXXX-XX-XX)
* Reapply the changes in 0.33.0 (the issue we were looking for was unrelated)
* Reapply `Make PG12 depend on plpython3u instead of plpythonu`
0.34.0 (2019-12-23)
* Revert changes done in 0.33.0, keeping function signature to drop them
0.33.0 (2019-12-20)
* Revert `Make PG12 depend on plpython3u instead of plpythonu`.
* Add functions to manage Federated Tables (Foreign Data Wrapper)

@ -65,7 +65,7 @@ $$
LANGUAGE SQL IMMUTABLE PARALLEL SAFE;
--
-- Produce a valid name for a schema generated for the Federated Server
-- Produce a valid name for a schema generated for the Federated Server
--
CREATE OR REPLACE FUNCTION @extschema@.__CDB_FS_Generate_Schema_Name(internal_server_name NAME, schema_name TEXT)
RETURNS NAME
@ -155,7 +155,7 @@ BEGIN
IF NOT (input_config ? 'credentials') THEN
RAISE EXCEPTION 'Credentials are mandatory';
END IF;
-- For now, allow not passing username or password
IF input_config->'credentials'->'username' IS NOT NULL THEN
mapping := jsonb_build_object('user', input_config->'credentials'->'username');
@ -163,7 +163,7 @@ BEGIN
IF input_config->'credentials'->'password' IS NOT NULL THEN
mapping := mapping || jsonb_build_object('password', input_config->'credentials'->'password');
END IF;
RETURN (input_config - 'credentials')::jsonb || jsonb_build_object('user_mapping', mapping);
END
$$
@ -345,7 +345,7 @@ LANGUAGE PLPGSQL VOLATILE PARALLEL UNSAFE;
--
-- List registered servers
--
--
CREATE OR REPLACE FUNCTION @extschema@.CDB_Federated_Server_List_Servers(server TEXT DEFAULT '%')
RETURNS TABLE (
name text,

@ -244,7 +244,7 @@ BEGIN
EXCEPTION WHEN OTHERS THEN
RAISE EXCEPTION 'Could not import schema "%" of server "%": %', remote_schema, server, SQLERRM;
END;
BEGIN
src_table := format('%I.%I', local_schema, remote_table);
EXCEPTION WHEN OTHERS THEN

@ -6,6 +6,13 @@ AS $$
$$
LANGUAGE SQL STABLE PARALLEL SAFE;
----- ########################## WARNING ##########################
----- The code below creates a new role for the organization but
----- only when the extension is INSTALLED in a database, i.e. it
----- won't work if you clone a database that has it installed.
----- If you do, you need to update the extension to next and back
----- ########################## WARNING ##########################
DO LANGUAGE 'plpgsql' $$
DECLARE
cdb_org_member_role_name TEXT;
@ -38,6 +45,12 @@ AS $$
$$
LANGUAGE SQL STABLE PARALLEL SAFE;
----- ########################## WARNING ##########################
----- The code below creates a new role for the organization but
----- only when the extension is INSTALLED in a database, i.e. it
----- won't work if you clone a database that has it installed.
----- If you do, you need to update the extension to next and back
----- ########################## WARNING ##########################
-- Administrator role creation on extension install
DO LANGUAGE 'plpgsql' $$
DECLARE

Loading…
Cancel
Save