Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Simple stored procedure-like function in PostgreSQL?

I want to create a function in pgsql that will take three parameters and return a single value (1 row, 1 col).

I have the query working but can not seem to find a proper example of creating a function to do this.

like image 821
n8gard Avatar asked Jan 18 '23 09:01

n8gard


1 Answers

Take a look at the example on this page, or this one.

If you actually go through the documentation there are multiple example of various functions and return types.

like image 66
Karlson Avatar answered Feb 27 '23 17:02

Karlson