Advertisement
Enter121

Untitled

May 27th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. CREATE or replace FUNCTION plS() RETURNS trigger
  2. LANGUAGE plpgsql
  3. AS
  4. '
  5. declare
  6. suma float;
  7. rabat int;
  8. rec record;
  9. begin
  10.  
  11. for rec in (select * from wypozyczenie)
  12. loop
  13. raise notice ''% %'',(select tytul from plyta where numer=rec.co_wypozyczyl), (select rec.data_wypozyczenia::date +35)::date;
  14.  
  15. end loop;
  16. return null;
  17. end;
  18. ';
  19. create trigger pl after insert on wypozyczenie for each statement execute procedure plS();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement