Skip to content

Commit

Permalink
drop function documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kharbat committed Mar 22, 2017
1 parent f7f0aee commit 4b2dbc8
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion blackbox/docs/sql/administration/user_defined_functions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,27 @@ User-defined functions are considered deterministic, meaning that they will
always return the same result value when called with the same argument values.
These return values are then cached, preventing multiple function executions.


DROP FUNCTION
-------------

User defined functions can be dropped like this::

cr> DROP FUNCTION log10(integer, integer);

Adding ``IF EXISITS`` prevents from raising an error if the function doesn't exist::

cr> DROP FUNCTION IF EXISITS log10(integer, integer);

If a function was created within a specific schema it can be dropped like this::

cr> DROP FUNCTION IF EXISTS my_schema.subtract(integer, integer);

Optionally, argument names can be specified within the drop statement::

cr> DROP FUNCTION IF EXISTS calculate_distance(start geo_point, end geo_point);


Supported Languages
-------------------

Expand Down Expand Up @@ -229,4 +250,4 @@ an ``object`` or a ``GeoJson``::
.. NOTE::

If the return value of the JavaScript function is ``undefined`` it is converted
to ``NULL``.
to ``NULL``.

0 comments on commit 4b2dbc8

Please sign in to comment.