PostgreSQL メモ
キャッシュ、キュー、全文検索、なんにでも PostgreSQL を使おう!という主張
PostgreSQL の設定生成器
DBバージョンやコア数やメモリ容量に合わせて最適な設定値を生成してくれる
PostgreSQLはINSERT時に RETURNING id と指定しないと挿入した行のIDを取得できない。
psql で update/commit が必要になるのは autocommit を切っている場合
hstore のバージョンが合わないとかで Postgres の pg_upgrade ができないときの対処法
PostgreSQLで、あるテーブルとそのテーブルを外部キー参照する計2つのカラムを1つのSQLでインサートする方法
macOS で再起動
code:shell.sh
$ launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
$ launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
macOS で自動起動を止めたいとき
$ launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
postgresql 10.5
timezone の設定値
Asia/Japan はNG
Asia/Tokyo はOK