目次
インストーラーを使う
大元のインストーラー配信先は以下
https://www.enterprisedb.com/downloads/postgres-postgresql-downloads





Password:shiny-lab
Port:5422
Advanced Option: Japanese Japanを選択する



パスを通してパワーシェルでショートカットを作る
powershelを開き以下を入力してEnter
notepad $PROFILE$profileがない場合以下を入力してみてください
echo $profile
#以下のような表示になります。これをコピーしてください
#C:\Users\shiny-fung\Documents\PowerShell\Microsoft.PowerShell_profile.ps1で以下に貼り付けます。
notepad C:\Users\shiny-fung\Documents\PowerShell\Microsoft.PowerShell_profile.ps1それでもできなければ
New-Item -ItemType File -Path $PROFILE -Forceこの後、notepad $profile
以下を張り付けて保存 *notepad保存ショートカット(CTRL + S)
$env:Path += ";C:\Program Files\PostgreSQL\16\bin"
# OR
$env:Path += ";C:\Program Files\PostgreSQL\17\bin"
$env:PGPASSWORD = "shiny-lab">デスクトップでShift + 右クリック>PowerShellウィンドウをここで開く>以下貼り付け
notepad OpenPsql.ps1>Enter>以下貼り付け>閉じる
cd "$HOME\Downloads"
psql -U postgresデスクトップ右クリック>新規作成>ショートカット>以下貼り付け
powershell.exe -NoExit -File "%USERPROFILE%\Desktop\OpenPsql.ps1"パワーシェル7の場合
"C:\Program Files\PowerShell\7\pwsh.exe" -NoExit -File %userprofile%\Desktop\OpenPsql.ps1次へ>適当な名前>完了
ダウンロード>ショートカットダブルクリック>以下を実行
\i 書き込み式SQLドリルworkbook.sqlA5:SQL-Mk2に進む
