Make cartodbfy return destoid
This commit is contained in:
@@ -323,10 +323,10 @@ $$ LANGUAGE PLPGSQL;
|
|||||||
-- Ensure a table is a "cartodb" table (See https://github.com/CartoDB/cartodb/wiki/CartoDB-user-table)
|
-- Ensure a table is a "cartodb" table (See https://github.com/CartoDB/cartodb/wiki/CartoDB-user-table)
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION CDB_CartodbfyTable(reloid REGCLASS)
|
CREATE OR REPLACE FUNCTION CDB_CartodbfyTable(reloid REGCLASS)
|
||||||
RETURNS void
|
RETURNS REGCLASS
|
||||||
AS $$
|
AS $$
|
||||||
BEGIN
|
BEGIN
|
||||||
PERFORM cartodb.CDB_CartodbfyTable('public', reloid);
|
RETURN cartodb.CDB_CartodbfyTable('public', reloid);
|
||||||
END;
|
END;
|
||||||
$$ LANGUAGE PLPGSQL;
|
$$ LANGUAGE PLPGSQL;
|
||||||
|
|
||||||
@@ -343,6 +343,10 @@ $$ LANGUAGE PLPGSQL;
|
|||||||
-- logic before the table re-write to avoid re-writing if the table
|
-- logic before the table re-write to avoid re-writing if the table
|
||||||
-- already has all the necessary columns in place.
|
-- already has all the necessary columns in place.
|
||||||
--
|
--
|
||||||
|
-- It returns the destoid of the table. If no rewritting is needed
|
||||||
|
-- the return value will be equal to reloid.
|
||||||
|
--
|
||||||
|
--
|
||||||
-- (0) _CDB_check_prerequisites
|
-- (0) _CDB_check_prerequisites
|
||||||
-- As before, this checks the prerequisites before trying to cartodbfy
|
-- As before, this checks the prerequisites before trying to cartodbfy
|
||||||
--
|
--
|
||||||
@@ -1121,7 +1125,7 @@ $$ LANGUAGE 'plpgsql';
|
|||||||
|
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION CDB_CartodbfyTable(destschema TEXT, reloid REGCLASS)
|
CREATE OR REPLACE FUNCTION CDB_CartodbfyTable(destschema TEXT, reloid REGCLASS)
|
||||||
RETURNS void
|
RETURNS REGCLASS
|
||||||
AS $$
|
AS $$
|
||||||
DECLARE
|
DECLARE
|
||||||
|
|
||||||
@@ -1185,5 +1189,6 @@ BEGIN
|
|||||||
|
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
|
RETURN (destschema || '.' || destname)::regclass;
|
||||||
END;
|
END;
|
||||||
$$ LANGUAGE 'plpgsql';
|
$$ LANGUAGE 'plpgsql';
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ CREATE TRIGGER
|
|||||||
INSERT 0 1
|
INSERT 0 1
|
||||||
ERROR: Quota exceeded by 3.9990234375KB
|
ERROR: Quota exceeded by 3.9990234375KB
|
||||||
0
|
0
|
||||||
|
big
|
||||||
INSERT 0 2048
|
INSERT 0 2048
|
||||||
INSERT 0 2048
|
INSERT 0 2048
|
||||||
INSERT 0 2048
|
INSERT 0 2048
|
||||||
|
|||||||
Reference in New Issue
Block a user