PostgreSQL: Difference between revisions
No edit summary |
|||
| (2 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
==Installation== | ==Getting Started== | ||
===Installation=== | |||
See [https://www.postgresql.org/download/ postgresql download] | |||
===Upgrading=== | ===Upgrading=== | ||
See [https://stackoverflow.com/questions/60409585/how-to-upgrade-postgresql-database-from-10-to-12-without-losing-data-for-openpro] | See [https://stackoverflow.com/questions/60409585/how-to-upgrade-postgresql-database-from-10-to-12-without-losing-data-for-openpro] | ||
| Line 11: | Line 14: | ||
# Remove and cleanup old postgresql files | # Remove and cleanup old postgresql files | ||
## | ## | ||
===Defaults=== | |||
To get into postgres for the first time: | |||
<pre> | |||
sudo -u postgres psql postgres | |||
</pre> | |||
==Users== | ==Users== | ||
<syntaxhighlight lang="postgres"> | <syntaxhighlight lang="postgres"> | ||
/* Create user */ | |||
CREATE USER myuser WITH ENCRYPTED PASSWORD 'mypass'; | CREATE USER myuser WITH ENCRYPTED PASSWORD 'mypass'; | ||
ALTER USER | |||
/* Give superuser */ | |||
ALTER USER myuser WITH SUPERUSER; | |||
</syntaxhighlight> | </syntaxhighlight> | ||