Difference between revisions of "PostgreSQL/admin"

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
Jump to navigation Jump to search
(Created page with "==Notes== There seems to be some correlation between {{arg|current system user}} and {{arg|Postgres user}}, at least insofar as running <code>psql</code> as pg's superuser ("p...")
 
Line 2: Line 2:
 
There seems to be some correlation between {{arg|current system user}} and {{arg|Postgres user}}, at least insofar as running <code>psql</code> as pg's superuser ("postgres" by default) lets you in without a password:
 
There seems to be some correlation between {{arg|current system user}} and {{arg|Postgres user}}, at least insofar as running <code>psql</code> as pg's superuser ("postgres" by default) lets you in without a password:
 
  su - postgres -c psql
 
  su - postgres -c psql
 +
To make a user into a superuser:
 +
alter user {{arg|username}} with superuser;

Revision as of 00:21, 8 November 2022

Notes

There seems to be some correlation between <current system user> and <Postgres user>, at least insofar as running psql as pg's superuser ("postgres" by default) lets you in without a password:

su - postgres -c psql

To make a user into a superuser:

alter user <username> with superuser;