sudo -u postgres

From wikieduonline
Revision as of 16:08, 2 February 2023 by ELF (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

sudo -u postgres psql


sudo -u postgres -- bash -c "psql -c 'CREATE database tsdb'"
sudo -u postgres -- bash -c "psql tsdb -c 'CREATE EXTENSION IF NOT EXISTS timescaledb;'"

EOF

psql -c


PostgreSQL: psql, .psqlrc, .pgpass, $HOME/.pg service.conf, -U, -W, -d, meta-commands: \du, \dg, \ddp, \dp, \list, \dn, \dt, \c, \l, \di, \q, show users, show, su - postgres, psql -c, \?, \connect, \conninfo, --version, --help, PL/pgSQL

Advertising: