title: IS NOT NULL test for a record does not return TRUE when variable is set
body: <p>Using a plpgsql procedure to extract a record if it exists, and then if it does, do something with it.</p>
  
  <p>The variable is a rowtype:</p>
  
  <pre><code>my_var my_table%rowtype;
  </code></pre>
  
  <p>I populate it with a SQL statement:</p>
  
  <pre><code>select * from my_table where owner_id = 6 into my_var;
  </code></pre>
  
  <p>I know it definitely has the row:</p>
  
  <pre><code>raise notice 'my_var is %', my_var;
  </code></pre>
  
  <p>Returns:</p>
  
  <pre><code>NOTICE:  my_var is (383,6,10)
  </code></pre>
  
  <p>But now I want to test that it got the record and BOTH of these if conditions fail:</p>
  
  <pre><code>if my_var is null then
    raise notice 'IT IS NULL';
  end if;
  if my_var is not null then
    raise notice 'IT IS NOT NULL';
  end if;
  </code></pre>
  
  <p>Neither of these raises appear in my messages log - it just never enters the blocks.  What's the correct way to test if you received a row from a <code>SELECT * INTO</code>?</p>