Ok, I found where to create the function and now I get the following error, using the code as posted by BilGatesIII: https://gyazo.com/8c3fc1ddbe3e83308e91026bb36b43d3
I'm using pgAdminIII. Also, there's a section called parameters, which may need some information to be input? https://gyazo.com/d07b323606cea22c68bf4c725211af50