title: how to convert a fetch row to a single string in postgresql
body: <p>For inputs of a postgis function, I used a cursor to fetch a record at once from a table. </p>
  
  <p>I know that the single record can be printed by the code: FETCH 1 FROM cur1. I wonder how to convert the fetched result into a single string. </p>
  
  <pre><code>BEGIN;
  DECLARE cur1 CURSOR FOR SELECT rec FROM Table;
  FETCH 1 FROM cur1;
                      rec
  ---------------------------------------
   vehicles
  (1 row)
  END;
  </code></pre>
  
  <p>Thanks!</p>