45.2. PL/Python Functions
CREATE FUNCTION funcname (argument-list)
RETURNS return-type
AS $$
# PL/Python function body
$$ LANGUAGE plpythonu;CREATE FUNCTION pymax (a integer, b integer)
RETURNS integer
AS $$
if a > b:
return a
return b
$$ LANGUAGE plpythonu;def __plpython_procedure_pymax_23456():
if a > b:
return a
return bLast updated
Was this helpful?