tag:help.appveyor.com,2012-11-13:/discussions/problems/25522-postgresql-12AppVeyor: Discussion 2020-01-18T12:49:28Ztag:help.appveyor.com,2012-11-13:Comment/478712232019-11-27T00:03:39Z2019-11-27T00:03:39ZPostgresql 12<div><p>I've created a new issue to install PostgreSQL 12 during the next update: <a href="https://github.com/appveyor/ci/issues/3223">https://github.com/appveyor/ci/issues/3223</a></p>
<p>You can use the following PS snippet to install PostgreSQL 12 during the build:</p>
<pre>
<code>Write-Host "Downloading PostgreSQL 12.1..."
$exePath = "$env:TEMP\postgresql-12.1-1-windows-x64.exe"
(New-Object Net.WebClient).DownloadFile('https://get.enterprisedb.com/postgresql/postgresql-12.1-1-windows-x64.exe', $exePath)
Write-Host "Installing..."
cmd /c start /wait $exePath --mode unattended --install_runtimes 0 --superpassword Password12!
Write-Host "PostgreSQL 12.1 installed" -ForegroundColor Green</code>
</pre>
<p>Takes around 2 mins to install.</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/478712232019-11-27T07:41:20Z2019-11-27T07:41:20ZPostgresql 12<div><p>This doesn't work either. Appears to be the same problem. The shell can't find the command line tools e.g. psql</p></div>w.n.batestag:help.appveyor.com,2012-11-13:Comment/478712232019-11-27T17:13:38Z2019-11-27T17:13:38ZPostgresql 12<div><p>To have <code>psql</code> in PATH just add this line to the end of the script:</p>
<pre>
<code>$env:path = "C:\Program Files\PostgreSQL\12\bin;$env:path"</code>
</pre></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/478712232020-01-18T12:49:26Z2020-01-18T12:49:27ZPostgresql 12<div><p>Verified and this is working! Thanks</p>
<p>Reminder: Remove the service PostgreSql in the AppVeyor.</p>
<pre>
<code>Write-Host "Temporary solution to install PostgreSql 12.1 (as recommended by Feodor Fitsner): https://help.appveyor.com/discussions/problems/25522-postgresql-12"
Write-Host "Downloading PostgreSql 12.1..." -ForegroundColor Yellow
$exePath = "$env:TEMP\postgresql-12.1-1-windows-x64.exe"
(New-Object Net.WebClient).DownloadFile('https://get.enterprisedb.com/postgresql/postgresql-12.1-1-windows-x64.exe', $exePath)
Write-Host "Installing PostgreSql 12.1..." -ForegroundColor Yellow
cmd /c start /wait $exePath --mode unattended --install_runtimes 0 --superpassword Password12!
Write-Host "PostgreSql 12.1 installed" -ForegroundColor Green
$env:path = "C:\Program Files\PostgreSQL\12\bin;$env:path"</code>
</pre></div>Michael Pendon