Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. DO
  2. $$
  3. DECLARE
  4. r record;
  5. BEGIN
  6.  
  7. r := null;
  8.  
  9. if r is null -- ERROR: record "r" is not assigned yet
  10. then
  11. end if;
  12.  
  13. END
  14. $$;
  15.  
  16. select null into r;
  17.  
  18. r:=row(null);
  19.  
  20. DO $$
  21. DECLARE
  22. r record;
  23. BEGIN
  24.  
  25. r := null;
  26.  
  27. BEGIN
  28. IF r IS NOT NULL THEN
  29. raise notice 'R IS INITIALIZED';
  30. END IF;
  31. EXCEPTION
  32. WHEN OTHERS THEN
  33. raise notice 'R IS NOT INITIALIZED';
  34. END;
  35.  
  36. END
  37. $$;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement