Summary
Writing functions in PostgreSQL is an extremely powerful tool. PostgreSQL functions provide the ability to add functionality to the database core to increase performance, security, and maintainability.
They can be written in just about any language that is available to the open source community, and several that are proprietary. If the language that you would like to write them in is not available, it can be made available quickly and easily through a very robust and complete compatibility layer.