title: Connect to Postgres from Swift
body: <p>In a <a href="https://en.wikipedia.org/wiki/Swift_(programming_language)" rel="noreferrer">Swift</a> app, how does one connect to a <a href="https://en.wikipedia.org/wiki/PostgreSQL" rel="noreferrer">Postgres</a> database server?</p>
  
  <ul>
  <li>In <a href="https://en.wikipedia.org/wiki/Java_(programming_language)" rel="noreferrer">Java</a>, we use <a href="https://en.wikipedia.org/wiki/Java_Database_Connectivity" rel="noreferrer">JDBC</a> with an <a href="https://jdbc.postgresql.org/" rel="noreferrer">compliant driver</a> to connect to a Postgres server, communicate SQL, and get a result set.</li>
  <li>In a <a href="https://en.wikipedia.org/wiki/Windows_API" rel="noreferrer">Win32</a> app, we use <a href="https://en.wikipedia.org/wiki/Open_Database_Connectivity" rel="noreferrer">ODBC</a> with a <a href="https://odbc.postgresql.org/" rel="noreferrer">compliant driver</a> to do the same.</li>
  </ul>
  
  <p>How to do the equivalent from Swift?</p>