Advertisement
Guest User

Untitled

a guest
May 15th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. create or replace function NOME_DA_FUNSSAO() // parametros sao opcionais
  2. returns void  // void é quando nao tem retorno, mas se quiser pode retornar int, text, etc..
  3. languagem plpgsql
  4. as $$
  5.  
  6. declare
  7.   // aqui é onde voce declara as variaveis da funcao
  8.   // esse bloco aqui não é obrigatorio, voce pode ter só o begin..end sem o 'declare'
  9.  
  10.  
  11. begin
  12.  
  13.     // aqui voce implementa
  14.  
  15. end;
  16. $$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement