togatttiのエンジニアメモ

過度な期待はしないでください.

PostgreSQL

psqlで、冗長な箇所を省き結果を取得する

例えば、PostgreSQLのpg_hba.confのパスだけをpsqlで取りたいとき、 単純に、-cオプションを使うと、 $ psql -c 'SHOW hba_file' hba_file ------------------------------------- /etc/postgresql/10/main/pg_hba.conf (1 row) 余分な箇所が混ざる。 その場…