title: how to combine two columns of integer in PostgreSQL?
body: <p>I have the following query: </p>
  
  <pre><code>select col1, col2
  from ...
  where...
  </code></pre>
  
  <p>which gives:</p>
  
  <pre><code>col1  col2
  5
         17
  4       5
  12
  5
         20
  4      17
  2       3
  </code></pre>
  
  <p>I want to convert it to one column with no duplicates as follows:</p>
  
  <pre><code>col3
  5
  17
  4
  12
  20
  2
  3
  </code></pre>
  
  <p>How can I do that?
  I read this topic <a href="https://stackoverflow.com/questions/12310986/combine-two-columns-and-add-into-one-new-column">Combine two columns and add into one new column</a> but it's not what I need... operator <code>||</code> won't help here.</p>
  
  <p><strong>Edit:</strong>
  <strong>col3</strong> is simply a list of all numbers that appear in <strong>col2</strong> and <strong>col1</strong>. </p>