title: How to restrict a column value to be same as other columns? [Postgresql]
body: <p>Below is the <code>match</code> table, which keeps record of all the matches between players from players table.<br /><br />
  You can see that the <code>winner_player</code> should be either <code>player_1</code> or <code>player_2</code>, I mean it should give error if I do insert any other player_id except <code>player_1</code> or <code>player_2</code>. But now I can insert any player_id (number) in this column.</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th style="text-align: center;">match_id</th>
  <th style="text-align: center;">player_1</th>
  <th style="text-align: center;">player_2</th>
  <th style="text-align: center;">winner_player</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td style="text-align: center;">1</td>
  <td style="text-align: center;">1</td>
  <td style="text-align: center;">2</td>
  <td style="text-align: center;">2</td>
  </tr>
  <tr>
  <td style="text-align: center;">2</td>
  <td style="text-align: center;">3</td>
  <td style="text-align: center;">4</td>
  <td style="text-align: center;">3</td>
  </tr>
  <tr>
  <td style="text-align: center;">3</td>
  <td style="text-align: center;">5</td>
  <td style="text-align: center;">6</td>
  <td style="text-align: center;">5</td>
  </tr>
  <tr>
  <td style="text-align: center;">4</td>
  <td style="text-align: center;">15</td>
  <td style="text-align: center;">16</td>
  <td style="text-align: center;">16</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p><b>My question:</b> how can I restrict <code>winner_player</code> column to be same as either <code>player_1</code> or <code>player_2</code></p>