title: How to extract substring excluding only the last word of string in Postgressql
body: <p>What will be the Postgres equivalent code for below code from Oracle:</p>
  <pre class="lang-sql prettyprint-override"><code>trim(substr(country, 1, instr(country,' ', -1)-1));
  </code></pre>
  <p>Can anyone help me in how to extract the whole part of string excluding the last word from string, which is separated using space.
  eg.</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>From</th>
  <th>To</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>NEW YORK 5654</td>
  <td>NEW YORK</td>
  </tr>
  <tr>
  <td>ST LOUIS PARK, MN 55426-9999</td>
  <td>ST LOUIS PARK, MN</td>
  </tr>
  </tbody>
  </table>
  </div>