title: How to get a output of a variable from function in postgresql
body: <p>I am new to PostgreSQL. I have the query:</p>
  
  <pre><code>---------
  DO
  $$
  DECLARE
      l_pin INT;
      l_pin1 int;
  BEGIN
      l_pin := 3;
      l_pin1 := 4;
  
  select l_pin,l_pin1;
  END;
  $$
  LANGUAGE PLPGSQL;
  --------------------------
  </code></pre>
  
  <p>from above query am getting an error as</p>
  
  <pre><code>ERROR:  query has no destination for result data
  HINT:  If you want to discard the results of a SELECT, use PERFORM instead.
  CONTEXT:  PL/pgSQL function inline_code_block line 9 at SQL statement
  SQL state: 42601
  </code></pre>
  
  <p>I need to get the values of <code>l_pin</code> and <code>l_pin1</code> as output.</p>