Skip to content

Instantly share code, notes, and snippets.

@vithalsamp
Last active February 25, 2018 16:29
Show Gist options
  • Save vithalsamp/b2489f8dfe0c5116c52b5c08080890c0 to your computer and use it in GitHub Desktop.
Save vithalsamp/b2489f8dfe0c5116c52b5c08080890c0 to your computer and use it in GitHub Desktop.
create or replace function udf_py_bignum(x float, y float)
returns float
stable
as $$
if x > y:
return x
return y
$$ language plpythonu;
--Call Created function
training=# Select udf_py_bignum(10.4,15.1);
udf_py_bignum
---------------
15.1
(1 row)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment