Create a return type for _cdb_has_usable_geom_record #141

This commit is contained in:
Rafa de la Torre
2015-09-15 18:49:59 +02:00
parent 3fdce65368
commit 789e89a5d2
+11 -9
View File
@@ -713,8 +713,18 @@ END;
$$ LANGUAGE 'plpgsql'; $$ LANGUAGE 'plpgsql';
CREATE TYPE _cdb_has_usable_geom_record
AS (has_usable_geoms boolean,
text_geom_column boolean,
text_geom_column_name text,
text_geom_column_srid boolean,
has_geom boolean,
has_geom_name text,
has_mercgeom boolean,
has_mercgeom_name text);
CREATE OR REPLACE FUNCTION _CDB_Has_Usable_Geom(reloid REGCLASS) CREATE OR REPLACE FUNCTION _CDB_Has_Usable_Geom(reloid REGCLASS)
RETURNS RECORD RETURNS _cdb_has_usable_geom_record
AS $$ AS $$
DECLARE DECLARE
r1 RECORD; r1 RECORD;
@@ -918,14 +928,6 @@ BEGIN
-- indexes are in place and apply a rename -- indexes are in place and apply a rename
SELECT * SELECT *
FROM _CDB_Has_Usable_Geom(reloid) FROM _CDB_Has_Usable_Geom(reloid)
AS (has_usable_geoms boolean,
text_geom_column boolean,
text_geom_column_name text,
text_geom_column_srid boolean,
has_geom boolean,
has_geom_name text,
has_mercgeom boolean,
has_mercgeom_name text)
INTO STRICT gc; INTO STRICT gc;
-- If geom is the wrong name, just rename it. -- If geom is the wrong name, just rename it.