SHARE
TWEET

Untitled

a guest Jun 19th, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. $$;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top