From c47116571f0d6284dea600fbccb052b428909308 Mon Sep 17 00:00:00 2001 From: Andy Eschbacher Date: Wed, 12 Oct 2016 14:19:19 -0400 Subject: [PATCH] properly close plpgsql function --- src/pg/sql/11_kmeans.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pg/sql/11_kmeans.sql b/src/pg/sql/11_kmeans.sql index fe078b5..59fcf59 100644 --- a/src/pg/sql/11_kmeans.sql +++ b/src/pg/sql/11_kmeans.sql @@ -12,7 +12,7 @@ $$ LANGUAGE plpythonu; -- query: sql query to retrieve all the needed data CREATE OR REPLACE FUNCTION CDB_KMeansNonspatial(query TEXT, col_names TEXT[], no_clusters INTEGER, id_col TEXT DEFAULT 'cartodb_id') -RETURNS TABLE(cluster_label text, cluster_center text, rowid bigint) +RETURNS TABLE(cluster_label text, cluster_center text, rowid bigint) AS $$ from crankshaft.clustering import kmeans_nonspatial return kmeans_nonspatial(query, colnames, num_clusters, id_col)