title: A better way to do this query in PL/pgSQL
body: <p>I am trying to turn the following query from Transact-SQL to PL/pgSQL</p>
  
  <pre><code>SELECT @val1 = val1, @val2= val2 FROM dbo.MyTable WHERE val3 = @val3
  </code></pre>
  
  <p>This with I have come out:</p>
  
  <pre><code>v_val1 := val1 FROM MyTable WHERE val3  = v_val3;
  v_val2 := val2 FROM MyTable WHERE val3 = v_val3;
  </code></pre>
  
  <p>Is there a better way to do this? May be in the same sentence like Transact-SQL </p>