title: How to check via script PostgreSQL database initialize or not?
body: <p>I am manually initializing a PostgreSql database in a directory using the following command in script file on Windows and Linux :</p>
  
  <pre><code>pg_ctl init -s -w -D ..\mydb
  </code></pre>
  
  <p>I want to check via a script that this command run only if database is not already initialized in that directory. Is this possible?</p>