Difference between revisions of "Sudo -u postgres"
Jump to navigation
Jump to search
Line 2: | Line 2: | ||
[[sudo -u postgres psql]] | [[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]] | [[EOF]] |
Latest revision as of 16:08, 2 February 2023
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;'"
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: