Spaces:
Sleeping
Sleeping
Download install_postgresql_check.ps1 from Nithesharaja/Software_Bug_Assistant: direct link, hf CLI and curl.
- Browser
- Download file 1.43 kB
-
https://huggingface.co/spaces/Nithesharaja/Software_Bug_Assistant/resolve/main/install_postgresql_check.ps1
- Command line
-
hf download hf://spaces/Nithesharaja/Software_Bug_Assistant/install_postgresql_check.ps1
-
curl -L -o install_postgresql_check.ps1 https://huggingface.co/spaces/Nithesharaja/Software_Bug_Assistant/resolve/main/install_postgresql_check.ps1
1.43 kB
| # PostgreSQL Installation Verification Script | |
| Write-Host "Checking PostgreSQL installation..." -ForegroundColor Cyan | |
| # Check if psql is in PATH | |
| $psqlPath = Get-Command psql -ErrorAction SilentlyContinue | |
| if ($psqlPath) { | |
| Write-Host "β psql found at: $($psqlPath.Source)" -ForegroundColor Green | |
| $version = & psql --version | |
| Write-Host " Version: $version" -ForegroundColor Green | |
| } else { | |
| Write-Host "β psql not found in PATH" -ForegroundColor Red | |
| Write-Host " You may need to add PostgreSQL bin directory to PATH:" -ForegroundColor Yellow | |
| Write-Host " C:\Program Files\PostgreSQL\16\bin" -ForegroundColor Yellow | |
| } | |
| # Check if PostgreSQL service is running | |
| $service = Get-Service -Name postgresql* -ErrorAction SilentlyContinue | |
| if ($service) { | |
| Write-Host "`nPostgreSQL Services found:" -ForegroundColor Cyan | |
| foreach ($svc in $service) { | |
| $status = if ($svc.Status -eq 'Running') { "β Running" } else { "β $($svc.Status)" } | |
| $color = if ($svc.Status -eq 'Running') { "Green" } else { "Red" } | |
| Write-Host " $($svc.Name): $status" -ForegroundColor $color | |
| } | |
| } else { | |
| Write-Host "`nβ No PostgreSQL service found" -ForegroundColor Red | |
| } | |
| Write-Host "`nTo test connection, run:" -ForegroundColor Cyan | |
| Write-Host " psql -U postgres" -ForegroundColor Yellow | |
| Write-Host "`nThen enter the password you set during installation." -ForegroundColor Yellow | |