CartoDB / crankshaft

CARTO Spatial Analysis extension for PostgreSQL
BSD 3-Clause "New" or "Revised" License
54 stars 20 forks source link

Alias function names to more common analysis names #196

Open andy-esch opened 6 years ago

andy-esch commented 6 years ago

List of function names to update (incomplete):

This can be accomplished as follow:

CREATE OR REPLACE FUNCTION CDB_RandomForestRegressor(...) RETURNS ... AS $$
BEGIN
RETURNS QUERY SELECT * FROM CDB_CreateAndPredictSegment(...);
END;
$$ LANGUAGE plpgsql;

This SO answer is a bit more concise: https://stackoverflow.com/questions/40300728/function-alias-for-postgres-default-function?answertab=active#tab-top

Along with this, the docs should be updated to include the new function names and have a note that the old function name is deprecated.

cc @stuartlynn