PostgreSQL CREATE FUNCTION By Practical Examples

PHOTO EMBED

Sun Nov 20 2022 04:10:28 GMT+0000 (Coordinated Universal Time)

Saved by @mvieira

create [or replace] function function_name(param_list)
   returns return_type 
   language plpgsql
  as
$$
declare 
-- variable declaration
begin
 -- logic
end;
$$
Code language: PostgreSQL SQL dialect and PL/pgSQL (pgsql)
content_copyCOPY

https://www.postgresqltutorial.com/postgresql-plpgsql/postgresql-create-function/