Postgresql Declare Function In Python Example