Merge remote-tracking branch 'carto/master' into 2273_support
This commit is contained in:
commit
ecf0a06448
@ -16,9 +16,6 @@ jobs:
|
|||||||
- env: POSTGRESQL_VERSION="11" POSTGIS_VERSION="2.5"
|
- env: POSTGRESQL_VERSION="11" POSTGIS_VERSION="2.5"
|
||||||
- env: POSTGRESQL_VERSION="12" POSTGIS_VERSION="2.5"
|
- env: POSTGRESQL_VERSION="12" POSTGIS_VERSION="2.5"
|
||||||
- env: POSTGRESQL_VERSION="12" POSTGIS_VERSION="3"
|
- 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:
|
script:
|
||||||
- sudo service postgresql stop;
|
- sudo service postgresql stop;
|
||||||
|
7
Makefile
7
Makefile
@ -1,7 +1,7 @@
|
|||||||
# cartodb/Makefile
|
# cartodb/Makefile
|
||||||
|
|
||||||
EXTENSION = cartodb
|
EXTENSION = cartodb
|
||||||
EXTVERSION = 0.33.0
|
EXTVERSION = 0.34.0
|
||||||
|
|
||||||
SED = sed
|
SED = sed
|
||||||
AWK = awk
|
AWK = awk
|
||||||
@ -106,6 +106,7 @@ UPGRADABLE = \
|
|||||||
0.31.0 \
|
0.31.0 \
|
||||||
0.32.0 \
|
0.32.0 \
|
||||||
0.33.0 \
|
0.33.0 \
|
||||||
|
0.34.0 \
|
||||||
$(EXTVERSION)dev \
|
$(EXTVERSION)dev \
|
||||||
$(EXTVERSION)next \
|
$(EXTVERSION)next \
|
||||||
$(END)
|
$(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)
|
PG_12_GE := $(shell [ $(PG_VERSION) -ge 12 ] && echo true)
|
||||||
PLPYTHONU := plpythonu
|
PLPYTHONU := plpythonu
|
||||||
ifeq ($(PG_12_GE), true)
|
ifeq ($(PG_12_GE), true)
|
||||||
# Reverted until we are ready for PG12 support in other projects
|
PLPYTHONU := plpython3u
|
||||||
PLPYTHONU := plpythonu
|
|
||||||
# PLPYTHONU := plpython3u
|
|
||||||
endif
|
endif
|
||||||
PGPORT ?= '5432'
|
PGPORT ?= '5432'
|
||||||
PGUSER ?= 'postgres'
|
PGUSER ?= 'postgres'
|
||||||
|
7
NEWS.md
7
NEWS.md
@ -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)
|
0.33.0 (2019-12-20)
|
||||||
* Revert `Make PG12 depend on plpython3u instead of plpythonu`.
|
* Revert `Make PG12 depend on plpython3u instead of plpythonu`.
|
||||||
* Add functions to manage Federated Tables (Foreign Data Wrapper)
|
* Add functions to manage Federated Tables (Foreign Data Wrapper)
|
||||||
|
@ -65,7 +65,7 @@ $$
|
|||||||
LANGUAGE SQL IMMUTABLE PARALLEL SAFE;
|
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)
|
CREATE OR REPLACE FUNCTION @extschema@.__CDB_FS_Generate_Schema_Name(internal_server_name NAME, schema_name TEXT)
|
||||||
RETURNS NAME
|
RETURNS NAME
|
||||||
@ -155,7 +155,7 @@ BEGIN
|
|||||||
IF NOT (input_config ? 'credentials') THEN
|
IF NOT (input_config ? 'credentials') THEN
|
||||||
RAISE EXCEPTION 'Credentials are mandatory';
|
RAISE EXCEPTION 'Credentials are mandatory';
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
-- For now, allow not passing username or password
|
-- For now, allow not passing username or password
|
||||||
IF input_config->'credentials'->'username' IS NOT NULL THEN
|
IF input_config->'credentials'->'username' IS NOT NULL THEN
|
||||||
mapping := jsonb_build_object('user', input_config->'credentials'->'username');
|
mapping := jsonb_build_object('user', input_config->'credentials'->'username');
|
||||||
@ -163,7 +163,7 @@ BEGIN
|
|||||||
IF input_config->'credentials'->'password' IS NOT NULL THEN
|
IF input_config->'credentials'->'password' IS NOT NULL THEN
|
||||||
mapping := mapping || jsonb_build_object('password', input_config->'credentials'->'password');
|
mapping := mapping || jsonb_build_object('password', input_config->'credentials'->'password');
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
RETURN (input_config - 'credentials')::jsonb || jsonb_build_object('user_mapping', mapping);
|
RETURN (input_config - 'credentials')::jsonb || jsonb_build_object('user_mapping', mapping);
|
||||||
END
|
END
|
||||||
$$
|
$$
|
||||||
@ -345,7 +345,7 @@ LANGUAGE PLPGSQL VOLATILE PARALLEL UNSAFE;
|
|||||||
|
|
||||||
--
|
--
|
||||||
-- List registered servers
|
-- List registered servers
|
||||||
--
|
--
|
||||||
CREATE OR REPLACE FUNCTION @extschema@.CDB_Federated_Server_List_Servers(server TEXT DEFAULT '%')
|
CREATE OR REPLACE FUNCTION @extschema@.CDB_Federated_Server_List_Servers(server TEXT DEFAULT '%')
|
||||||
RETURNS TABLE (
|
RETURNS TABLE (
|
||||||
name text,
|
name text,
|
||||||
|
@ -244,7 +244,7 @@ BEGIN
|
|||||||
EXCEPTION WHEN OTHERS THEN
|
EXCEPTION WHEN OTHERS THEN
|
||||||
RAISE EXCEPTION 'Could not import schema "%" of server "%": %', remote_schema, server, SQLERRM;
|
RAISE EXCEPTION 'Could not import schema "%" of server "%": %', remote_schema, server, SQLERRM;
|
||||||
END;
|
END;
|
||||||
|
|
||||||
BEGIN
|
BEGIN
|
||||||
src_table := format('%I.%I', local_schema, remote_table);
|
src_table := format('%I.%I', local_schema, remote_table);
|
||||||
EXCEPTION WHEN OTHERS THEN
|
EXCEPTION WHEN OTHERS THEN
|
||||||
|
@ -6,6 +6,13 @@ AS $$
|
|||||||
$$
|
$$
|
||||||
LANGUAGE SQL STABLE PARALLEL SAFE;
|
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' $$
|
DO LANGUAGE 'plpgsql' $$
|
||||||
DECLARE
|
DECLARE
|
||||||
cdb_org_member_role_name TEXT;
|
cdb_org_member_role_name TEXT;
|
||||||
@ -38,6 +45,12 @@ AS $$
|
|||||||
$$
|
$$
|
||||||
LANGUAGE SQL STABLE PARALLEL SAFE;
|
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
|
-- Administrator role creation on extension install
|
||||||
DO LANGUAGE 'plpgsql' $$
|
DO LANGUAGE 'plpgsql' $$
|
||||||
DECLARE
|
DECLARE
|
||||||
|
Loading…
Reference in New Issue
Block a user