Postgresql 12

w.n.bates's Avatar

w.n.bates

26 Nov, 2019 05:09 PM

We'd like to start using Postgresql 12 but it looks like the highest version on your VM's is still just V10?
I don't seem to be able to use Chocolatey to install it as it can't find the command line tools despite using chocolatey's refreshenv command and a couple of other different approaches.
Any plans to support the current version of Postgresql?
Any tips on how I can start using it now?

  1. Support Staff 1 Posted by Feodor Fitsner on 27 Nov, 2019 12:03 AM

    Feodor Fitsner's Avatar

    I've created a new issue to install PostgreSQL 12 during the next update: https://github.com/appveyor/ci/issues/3223

    You can use the following PS snippet to install PostgreSQL 12 during the build:

    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
    

    Takes around 2 mins to install.

  2. 2 Posted by w.n.bates on 27 Nov, 2019 07:41 AM

    w.n.bates's Avatar

    This doesn't work either. Appears to be the same problem. The shell can't find the command line tools e.g. psql

  3. Support Staff 3 Posted by Feodor Fitsner on 27 Nov, 2019 05:13 PM

    Feodor Fitsner's Avatar

    To have psql in PATH just add this line to the end of the script:

    $env:path = "C:\Program Files\PostgreSQL\12\bin;$env:path"
    
  4. 4 Posted by Michael Pendon on 18 Jan, 2020 12:49 PM

    Michael Pendon's Avatar

    Verified and this is working! Thanks

    Reminder: Remove the service PostgreSql in the AppVeyor.

    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"
    

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

07 Jul, 2020 06:21 PM
07 Jul, 2020 03:15 PM
05 Jul, 2020 02:33 AM
03 Jul, 2020 07:29 PM
03 Jul, 2020 03:53 AM

 

02 Jul, 2020 09:09 PM
02 Jul, 2020 03:24 PM
01 Jul, 2020 01:12 PM
30 Jun, 2020 04:26 PM
25 Jun, 2020 05:54 PM
24 Jun, 2020 08:11 AM